diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/previews/PreviewTextViewModel.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/previews/PreviewTextViewModel.kt index 57af51248c4..776e723fa26 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/previews/PreviewTextViewModel.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/previews/PreviewTextViewModel.kt @@ -38,10 +38,10 @@ import kotlinx.coroutines.launch class PreviewTextViewModel( private val filterFileMenuOptionsUseCase: FilterFileMenuOptionsUseCase, + getFileByIdAsStreamUseCase: GetFileByIdAsStreamUseCase, private val contextProvider: ContextProvider, private val coroutinesDispatcherProvider: CoroutinesDispatcherProvider, - getFileByIdAsStreamUseCase: GetFileByIdAsStreamUseCase, - ocFile: OCFile + ocFile: OCFile, ) : ViewModel() { private val _menuOptions: MutableStateFlow> = MutableStateFlow(emptyList()) diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageViewModel.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageViewModel.kt index 6a800d50fee..8cb75c47765 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageViewModel.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageViewModel.kt @@ -52,7 +52,6 @@ class PreviewImageViewModel( ocFile: OCFile, ) : ViewModel() { - private val _downloads = MediatorLiveData>>() val downloads: LiveData>> = _downloads diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt index 1046eb6a6df..7af3460b036 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt @@ -86,7 +86,6 @@ import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.parameter.parametersOf import timber.log.Timber -@RequiresApi(Build.VERSION_CODES.TIRAMISU) @OptIn(UnstableApi::class) class PreviewVideoActivity : FileActivity(), Player.Listener, OnPrepareVideoPlayerTaskListener, FileFragment.ContainerActivity, MenuProvider { private var account: Account? = null @@ -97,7 +96,7 @@ class PreviewVideoActivity : FileActivity(), Player.Listener, OnPrepareVideoPlay private var playWhenReady = true private var playbackPosition: Long = 0 private var windowInsetsController: WindowInsetsControllerCompat? = null - private val previewVideoViewModel: PreviewVideoViewModel by viewModel() { parametersOf(intent.getParcelableExtra(EXTRA_FILE, OCFile::class.java)) } + private val previewVideoViewModel: PreviewVideoViewModel by viewModel { parametersOf(intent.getParcelableExtra(EXTRA_FILE)) } private val fileOperationsViewModel: FileOperationsViewModel by viewModel() private val transfersViewModel: TransfersViewModel by viewModel()