diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/renamefile/RenameFileDialogFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/renamefile/RenameFileDialogFragment.kt index 1a284c06b94..b8ff0d8a7f9 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/renamefile/RenameFileDialogFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/renamefile/RenameFileDialogFragment.kt @@ -34,7 +34,6 @@ import com.google.android.material.textfield.TextInputLayout import com.owncloud.android.R import com.owncloud.android.domain.files.model.OCFile import com.owncloud.android.extensions.avoidScreenshotsIfNeeded -import com.owncloud.android.extensions.showMessageInSnackbar import com.owncloud.android.presentation.files.operations.FileOperation import com.owncloud.android.presentation.files.operations.FileOperationsViewModel import com.owncloud.android.utils.PreferenceUtils @@ -141,17 +140,6 @@ class RenameFileDialogFragment : DialogFragment(), DialogInterface.OnClickListen } } - /** - * Show a temporary message in a Snackbar bound to the content view of the parent Activity - * - * @param messageResource Message to show. - */ - private fun showSnackMessage(messageResource: Int) { - showMessageInSnackbar( - message = getString(messageResource) - ) - } - companion object { const val FRAGMENT_TAG_RENAME_FILE = "RENAME_FILE_FRAGMENT" private const val ARG_TARGET_FILE = "TARGET_FILE" diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/sharees/UsersAndGroupsSearchProvider.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/sharees/UsersAndGroupsSearchProvider.kt index 82b46a959b0..08bae7336e4 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/sharees/UsersAndGroupsSearchProvider.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/sharees/UsersAndGroupsSearchProvider.kt @@ -204,8 +204,8 @@ class UsersAndGroupsSearchProvider : ContentProvider() { ShareType.FEDERATED -> { if (federatedShareAllowed) { icon = R.drawable.ic_user - displayName = if (userName == shareWith) { context?.getString(R.string.share_remote_clarification, userName) } - else { + displayName = if (userName == shareWith) { context?.getString(R.string.share_remote_clarification, userName) + } else { val uriSplitted = shareWith.split("@".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() context?.getString(R.string.share_known_remote_clarification, userName, uriSplitted[uriSplitted.size - 1]) } diff --git a/owncloudApp/src/main/java/com/owncloud/android/workers/DownloadFileWorker.kt b/owncloudApp/src/main/java/com/owncloud/android/workers/DownloadFileWorker.kt index b8fdb94208d..e6ac9b0497f 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/workers/DownloadFileWorker.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/workers/DownloadFileWorker.kt @@ -53,11 +53,7 @@ import com.owncloud.android.presentation.authentication.EXTRA_ACCOUNT import com.owncloud.android.presentation.authentication.EXTRA_ACTION import com.owncloud.android.presentation.authentication.LoginActivity import com.owncloud.android.presentation.transfers.TransferOperation.Download -import com.owncloud.android.ui.activity.FileActivity -import com.owncloud.android.ui.activity.FileDisplayActivity import com.owncloud.android.ui.errorhandling.ErrorMessageAdapter -import com.owncloud.android.ui.preview.PreviewImageActivity -import com.owncloud.android.ui.preview.PreviewImageFragment.Companion.canBePreviewed import com.owncloud.android.utils.DOWNLOAD_NOTIFICATION_CHANNEL_ID import com.owncloud.android.utils.DOWNLOAD_NOTIFICATION_ID_DEFAULT import com.owncloud.android.utils.FileStorageUtils @@ -309,27 +305,6 @@ class DownloadFileWorker( ) } - private fun composePendingIntentToPreviewFile(): PendingIntent { - /// includes a pending intent in the notification showing the details view of the file - val showDetailsIntent: Intent = - if (canBePreviewed(ocFile)) { - Intent(appContext, PreviewImageActivity::class.java) - } else { - Intent(appContext, FileDisplayActivity::class.java) - }.apply { - putExtra(FileActivity.EXTRA_FILE, ocFile) - putExtra(FileActivity.EXTRA_ACCOUNT, account) - flags = Intent.FLAG_ACTIVITY_CLEAR_TOP - } - - return PendingIntent.getActivity( - appContext, - System.currentTimeMillis().toInt(), - showDetailsIntent, - PendingIntent.FLAG_IMMUTABLE - ) - } - private fun getClientForThisDownload(): OwnCloudClient = SingleSessionManager.getDefaultSingleton() .getClientFor(OwnCloudAccount(AccountUtils.getOwnCloudAccountByName(appContext, account.name), appContext), appContext)