Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5ff36d6
feat: In-app image viewer
ohassine May 13, 2026
6c99dd7
feat: In-app video player
ohassine Jun 9, 2026
c295c36
feat: In-app video loading
ohassine Jun 9, 2026
49347d7
Merge remote-tracking branch 'origin/develop' into in-app-video-player
ohassine Jun 11, 2026
8e2d341
feat: conflicts
ohassine Jun 12, 2026
068cd3b
feat: cleanup
ohassine Jun 12, 2026
28f34ef
feat: cleanup
ohassine Jun 12, 2026
71723c6
feat: cleanup
ohassine Jun 12, 2026
e166fcd
Merge remote-tracking branch 'origin/develop' into in-app-audio-palyer
ohassine Jun 16, 2026
548231b
Merge remote-tracking branch 'origin/develop' into in-app-audio-palyer
ohassine Jul 8, 2026
43c9b31
feat: cleanup
ohassine Jul 8, 2026
a79df03
feat: play audio by uri
ohassine Jul 8, 2026
255f4e1
feat(drive): cleanup
ohassine Jul 13, 2026
247a56a
Merge remote-tracking branch 'origin/develop' into in-app-audio-palyer
ohassine Jul 14, 2026
2c7603a
feat(drive): detekt
ohassine Jul 14, 2026
642d3fe
feat(drive): detekt
ohassine Jul 14, 2026
a0ec516
feat(drive): add screen title
ohassine Jul 14, 2026
f080003
Merge remote-tracking branch 'origin/develop' into in-app-audio-palyer
ohassine Jul 14, 2026
640ea36
Merge branch 'develop' into in-app-audio-palyer
ohassine Jul 15, 2026
6045ce6
Merge branch 'develop' into in-app-audio-palyer
ohassine Jul 21, 2026
f8db60d
chore: address comments
ohassine Jul 22, 2026
a2c816f
Merge branch 'develop' into in-app-audio-palyer
ohassine Jul 22, 2026
03b3708
chore: compose stability
ohassine Jul 22, 2026
f676753
chore: remove file name
ohassine Jul 22, 2026
5aa42ee
Merge remote-tracking branch 'origin/develop' into in-app-audio-palyer
ohassine Jul 22, 2026
3db87e6
chore: detekt
ohassine Jul 22, 2026
f301009
feat: design changes and cleanup
ohassine Jul 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/stability/app-devDebug.stability
Original file line number Diff line number Diff line change
Expand Up @@ -6704,12 +6704,12 @@ private fun com.wire.android.ui.home.conversations.messages.item.buildContent(is
- isWireCellsEnabled: STABLE (primitive type)

@Composable
private fun com.wire.android.ui.home.conversations.messages.item.buildContent(expandable: kotlin.Boolean, learnMoreLinkResId: kotlin.Int?, learnMoreTextResId: kotlin.Int, iconResId: kotlin.Int, iconTintColor: androidx.compose.ui.graphics.Color?, iconSize: androidx.compose.ui.unit.Dp, additionalVerticalPaddings: androidx.compose.ui.unit.Dp, backgroundColor: androidx.compose.ui.graphics.Color?, annotatedStringBuilder: @[Composable] androidx.compose.runtime.internal.ComposableFunction1<@[ParameterName(name = \): com.wire.android.ui.home.conversations.messages.item.SystemMessageContent
private fun com.wire.android.ui.home.conversations.messages.item.buildContent(expandable: kotlin.Boolean, learnMorePage: com.wire.android.util.SupportPage?, learnMoreTextResId: kotlin.Int, iconResId: kotlin.Int, iconTintColor: androidx.compose.ui.graphics.Color?, iconSize: androidx.compose.ui.unit.Dp, additionalVerticalPaddings: androidx.compose.ui.unit.Dp, backgroundColor: androidx.compose.ui.graphics.Color?, annotatedStringBuilder: @[Composable] androidx.compose.runtime.internal.ComposableFunction1<@[ParameterName(name = \): com.wire.android.ui.home.conversations.messages.item.SystemMessageContent
skippable: true
restartable: true
params:
- expandable: STABLE (primitive type)
- learnMoreLinkResId: STABLE (class with no mutable properties)
- learnMorePage: STABLE (class with no mutable properties)
- learnMoreTextResId: STABLE (primitive type)
- iconResId: STABLE (primitive type)
- iconTintColor: STABLE (marked @Stable or @Immutable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.paging.compose.collectAsLazyPagingItems
import com.ramcosta.composedestinations.generated.cells.destinations.AddRemoveTagsScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.CellAudioPlayerScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.CellImageViewerScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.PublicLinkScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.SearchScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.VideoPlayerScreenDestination
import com.wire.android.feature.cells.R
import com.wire.android.feature.cells.ui.audioplayer.AudioPlayerNavArgs
import com.wire.android.feature.cells.ui.common.OfflineBanner
import com.wire.android.feature.cells.ui.imageviewer.CellImageViewerNavArgs
import com.wire.android.feature.cells.ui.search.DriveSearchScreenType
Expand Down Expand Up @@ -137,7 +139,7 @@ fun AllFilesScreen(
)
)
},
showVideoPlayer = { file ->
showVideoViewer = { file ->
navigator.navigate(
NavigationCommand(
VideoPlayerScreenDestination(
Expand All @@ -150,6 +152,19 @@ fun AllFilesScreen(
)
)
},
showAudioPlayer = { file ->
navigator.navigate(
NavigationCommand(
CellAudioPlayerScreenDestination(
AudioPlayerNavArgs(
localPath = file.localPath,
contentUrl = file.contentUrl,
fileName = file.name,
)
)
)
)
},
fileReadyFlow = viewModel.fileReadyFlow,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ internal fun CellScreenContent(
retryEditNodeError: (String) -> Unit = {},
showVersionHistoryScreen: (String, String) -> Unit = { _, _ -> },
showImageViewer: (CellNodeUi.File) -> Unit = {},
showVideoPlayer: (CellNodeUi.File) -> Unit = {},
showVideoViewer: (CellNodeUi.File) -> Unit = {},
showAudioPlayer: (CellNodeUi.File) -> Unit = {},
fileReadyFlow: Flow<CellNodeUi.File>? = emptyFlow(),
) {

Expand Down Expand Up @@ -260,7 +261,8 @@ internal fun CellScreenContent(
).show()
}
is OpenImageViewer -> showImageViewer(action.file)
is OpenVideoPlayer -> showVideoPlayer(action.file)
is OpenVideoViewer -> showVideoViewer(action.file)
is OpenAudioPlayer -> showAudioPlayer(action.file)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
cancelOpenDownload(uuid)
}

@Suppress("ReturnCount")
private fun openFileContentUrl(file: CellNodeUi.File) {
when (file.assetType) {
AttachmentFileType.IMAGE -> {
Expand All @@ -385,12 +386,14 @@
return
}
}

AttachmentFileType.VIDEO -> {
sendAction(OpenVideoPlayer(file))
sendAction(OpenVideoViewer(file))
return

Check warning on line 391 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt#L391

Added line #L391 was not covered by tests
}
AttachmentFileType.AUDIO -> {
sendAction(OpenAudioPlayer(file))
return
}

else -> Unit
}
file.contentUrl?.let { url ->
Expand All @@ -404,6 +407,7 @@
}
}

@Suppress("ReturnCount")
private fun openLocalFile(file: CellNodeUi.File) {
when (file.assetType) {
AttachmentFileType.IMAGE -> {
Expand All @@ -412,12 +416,14 @@
return
}
}

AttachmentFileType.VIDEO -> {
sendAction(OpenVideoPlayer(file))
sendAction(OpenVideoViewer(file))
return

Check warning on line 421 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt#L421

Added line #L421 was not covered by tests
}
AttachmentFileType.AUDIO -> {
sendAction(OpenAudioPlayer(file))
return
}

else -> Unit
}
file.localPath?.let { path ->
Expand Down Expand Up @@ -670,7 +676,8 @@
internal data class ShowEditErrorDialog(val nodeUuid: String) : CellViewAction
internal data object ShowOfflineFileSaved : CellViewAction
internal data class OpenImageViewer(val file: CellNodeUi.File) : CellViewAction
internal data class OpenVideoPlayer(val file: CellNodeUi.File) : CellViewAction
internal data class OpenVideoViewer(val file: CellNodeUi.File) : CellViewAction
internal data class OpenAudioPlayer(val file: CellNodeUi.File) : CellViewAction

Check warning on line 680 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt#L680

Added line #L680 was not covered by tests

internal enum class CellError(val message: Int) {
NO_APP_FOUND(R.string.no_app_found),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory.Companion.APPLICATION_KEY
import androidx.lifecycle.createSavedStateHandle
import androidx.lifecycle.viewmodel.CreationExtras
import com.wire.android.feature.cells.ui.audioplayer.AudioPlayerViewModel
import com.wire.android.feature.cells.ui.create.file.CreateFileViewModel
import com.wire.android.feature.cells.ui.create.folder.CreateFolderViewModel
import com.wire.android.feature.cells.ui.imageviewer.CellImageViewerViewModel
Expand Down Expand Up @@ -130,6 +131,19 @@
)
}

@Provides
@IntoMap
@ViewModelAssistedFactoryKey(AudioPlayerViewModel::class)
fun audioPlayerViewModel(factory: CellsViewModelFactory): ViewModelAssistedFactory =
savedStateViewModel {
factory.cellAudioPlayerViewModel(

Check warning on line 139 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsMetroViewModelBindings.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsMetroViewModelBindings.kt#L138-L139

Added lines #L138 - L139 were not covered by tests
context = checkNotNull(it[APPLICATION_KEY]) {
"No Application was provided via CreationExtras"

Check warning on line 141 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsMetroViewModelBindings.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsMetroViewModelBindings.kt#L141

Added line #L141 was not covered by tests
},
savedStateHandle = it.createSavedStateHandle(),

Check warning on line 143 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsMetroViewModelBindings.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsMetroViewModelBindings.kt#L143

Added line #L143 was not covered by tests
)
}

private fun savedStateViewModel(create: (CreationExtras) -> ViewModel): ViewModelAssistedFactory =
object : ViewModelAssistedFactory {
override fun create(extras: CreationExtras): ViewModel = create(extras)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import android.content.Context
import androidx.lifecycle.SavedStateHandle
import com.wire.android.feature.cells.ui.audioplayer.AudioPlayerViewModel
import com.wire.android.feature.cells.ui.create.file.CreateFileViewModel
import com.wire.android.feature.cells.ui.create.folder.CreateFolderViewModel
import com.wire.android.feature.cells.ui.edit.OnlineEditor
Expand Down Expand Up @@ -73,7 +74,7 @@
import dev.zacsweers.metro.Inject
import dev.zacsweers.metro.Named

@Suppress("LongParameterList")
@Suppress("LongParameterList", "TooManyFunctions")

Check warning on line 77 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsViewModelFactory.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsViewModelFactory.kt#L77

Added line #L77 was not covered by tests
class CellsViewModelFactory @Inject constructor(
private val getCellFilesPaged: GetPaginatedFilesFlowUseCase,
private val deleteCellAsset: DeleteCellAssetUseCase,
Expand Down Expand Up @@ -229,4 +230,12 @@
context = context,
savedStateHandle = savedStateHandle,
)

internal fun cellAudioPlayerViewModel(
context: Context,
savedStateHandle: SavedStateHandle
) = AudioPlayerViewModel(
context = context,
savedStateHandle = savedStateHandle,

Check warning on line 239 in features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsViewModelFactory.kt

View check run for this annotation

Codecov / codecov/patch

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellsViewModelFactory.kt#L237-L239

Added lines #L237 - L239 were not covered by tests
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelStoreOwner
import androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner
import com.wire.android.di.metro.sessionKeyedMetroViewModel
import com.wire.android.feature.cells.ui.audioplayer.AudioPlayerViewModel
import com.wire.android.feature.cells.ui.create.file.CreateFileViewModel
import com.wire.android.feature.cells.ui.create.folder.CreateFolderViewModel
import com.wire.android.feature.cells.ui.imageviewer.CellImageViewerViewModel
Expand Down Expand Up @@ -94,3 +95,6 @@ fun cellImageViewerViewModel(): CellImageViewerViewModel = cellsViewModel()

@Composable
fun cellVideoViewerViewModel(): VideoPlayerViewModel = cellsViewModel()

@Composable
fun cellAudioPlayerViewModel(): AudioPlayerViewModel = cellsViewModel()
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import androidx.paging.PagingData
import androidx.paging.compose.LazyPagingItems
import androidx.paging.compose.collectAsLazyPagingItems
import com.ramcosta.composedestinations.generated.cells.destinations.AddRemoveTagsScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.CellAudioPlayerScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.CellImageViewerScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.ConversationFilesWithSlideInTransitionScreenDestination
import com.ramcosta.composedestinations.generated.cells.destinations.CreateFileScreenDestination
Expand All @@ -58,6 +59,7 @@ import com.ramcosta.composedestinations.generated.cells.destinations.VersionHist
import com.ramcosta.composedestinations.generated.cells.destinations.VideoPlayerScreenDestination
import com.wire.android.feature.cells.R
import com.wire.android.feature.cells.domain.model.AttachmentFileType
import com.wire.android.feature.cells.ui.audioplayer.AudioPlayerNavArgs
import com.wire.android.feature.cells.ui.common.OfflineBanner
import com.wire.android.feature.cells.ui.create.FileTypeBottomSheetDialog
import com.wire.android.feature.cells.ui.create.file.CreateFileScreenNavArgs
Expand Down Expand Up @@ -382,7 +384,7 @@ internal fun ConversationFilesScreenContent(
)
)
},
showVideoPlayer = { file ->
showVideoViewer = { file ->
navigator.navigate(
NavigationCommand(
VideoPlayerScreenDestination(
Expand All @@ -395,6 +397,19 @@ internal fun ConversationFilesScreenContent(
)
)
},
showAudioPlayer = { file ->
navigator.navigate(
NavigationCommand(
CellAudioPlayerScreenDestination(
AudioPlayerNavArgs(
localPath = file.localPath,
contentUrl = file.contentUrl,
fileName = file.name,
)
)
)
)
},
retryEditNodeError = { retryEditNodeError(it) },
isRefreshing = isRefreshing,
onRefresh = onRefresh,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Wire
* Copyright (C) 2026 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package com.wire.android.feature.cells.ui.audioplayer

data class AudioPlaybackState(
val isPlaying: Boolean = false,
val isCompleted: Boolean = false,
val isPrepared: Boolean = false,
val currentPositionMs: Int = 0,
val durationMs: Int = 0,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Wire
* Copyright (C) 2026 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package com.wire.android.feature.cells.ui.audioplayer

data class AudioPlayerNavArgs(
val localPath: String? = null,
val contentUrl: String? = null,
val fileName: String? = null,
)
Loading
Loading