From 0c36fa3e4be446b825c3b5076ad0218630bb472d Mon Sep 17 00:00:00 2001 From: joragua Date: Wed, 8 Jan 2025 10:51:21 +0100 Subject: [PATCH] refactor: remove unnecessary function and join two if conditions --- .../owncloud/android/presentation/sharing/ShareActivity.kt | 6 ++---- .../com/owncloud/android/ui/activity/FileDisplayActivity.kt | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/ShareActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/ShareActivity.kt index 328919f80d4..f66cdd5fdb5 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/ShareActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/ShareActivity.kt @@ -294,10 +294,8 @@ class ShareActivity : FileActivity(), ShareFragmentListener { override fun onOptionsItemSelected(item: MenuItem): Boolean { var retval = true - if (item.itemId == android.R.id.home) { - if (!supportFragmentManager.popBackStackImmediate()) { - finish() - } + if (item.itemId == android.R.id.home && !supportFragmentManager.popBackStackImmediate()) { + finish() } else { retval = super.onOptionsItemSelected(item) } diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt index 0692a37a47a..0ace414a562 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt @@ -1509,10 +1509,6 @@ class FileDisplayActivity : FileActivity(), } } - override fun onSavedCertificate() { - // Nothing to do - } - private fun requestForDownload(file: OCFile) { val downloadFileUseCase: DownloadFileUseCase by inject()