From 5798b30d951191d4511b283f0559160f8a382320 Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Wed, 25 Oct 2023 09:49:55 +0100 Subject: [PATCH] Bitrise corrections 2 --- .../files/details/FileDetailsViewModel.kt | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsViewModel.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsViewModel.kt index 4c15f502917c..b3401ac910ae 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsViewModel.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsViewModel.kt @@ -182,18 +182,20 @@ class FileDetailsViewModel( val shareWithUsersAllowed = contextProvider.getBoolean(R.bool.share_with_users_feature) val sendAllowed = contextProvider.getString(R.string.send_files_to_other_apps).equals("on", ignoreCase = true) viewModelScope.launch(coroutinesDispatcherProvider.io) { - val result = filterFileMenuOptionsUseCase(FilterFileMenuOptionsUseCase.Params( - files = listOf(file), - accountName = getAccount().name, - isAnyFileVideoPreviewing = false, - displaySelectAll = false, - displaySelectInverse = false, - onlyAvailableOfflineFiles = false, - onlySharedByLinkFiles = false, - shareViaLinkAllowed = shareViaLinkAllowed, - shareWithUsersAllowed = shareWithUsersAllowed, - sendAllowed = sendAllowed, - )) + val result = filterFileMenuOptionsUseCase( + FilterFileMenuOptionsUseCase.Params( + files = listOf(file), + accountName = getAccount().name, + isAnyFileVideoPreviewing = false, + displaySelectAll = false, + displaySelectInverse = false, + onlyAvailableOfflineFiles = false, + onlySharedByLinkFiles = false, + shareViaLinkAllowed = shareViaLinkAllowed, + shareWithUsersAllowed = shareWithUsersAllowed, + sendAllowed = sendAllowed, + ) + ) result.apply { remove(FileMenuOption.DETAILS) remove(FileMenuOption.MOVE) @@ -203,12 +205,13 @@ class FileDetailsViewModel( } } - fun setLastUsageFile(file: OCFile){ - setLastUsageFileUseCase(SetLastUsageFileUseCase.Params( - fileId = file.id, - lastUsage = System.currentTimeMillis(), - isAvailableLocally = file.isAvailableLocally, - isFolder = file.isFolder, + fun setLastUsageFile(file: OCFile) { + setLastUsageFileUseCase( + SetLastUsageFileUseCase.Params( + fileId = file.id, + lastUsage = System.currentTimeMillis(), + isAvailableLocally = file.isAvailableLocally, + isFolder = file.isFolder, ) ) }