From ea099b54596ca9789351e5850f7ae32273aa47ed Mon Sep 17 00:00:00 2001 From: alperozturk Date: Tue, 24 Oct 2023 14:16:30 +0200 Subject: [PATCH] Suppress magic number Signed-off-by: alperozturk --- .../android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 9be7b83c2d..0167293875 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -537,6 +537,7 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * * @return 0 if ASK_USER, 1 if OVERWRITE, 2 if RENAME, 3 if SKIP, Otherwise: 0 */ + @Suppress("MagicNumber") private fun getSelectionIndexForNameCollisionPolicy(nameCollisionPolicy: NameCollisionPolicy): Int { return when (nameCollisionPolicy) { NameCollisionPolicy.OVERWRITE -> 1 @@ -551,6 +552,7 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * * @return ASK_USER if 0, OVERWRITE if 1, RENAME if 2, SKIP if 3. Otherwise: ASK_USER */ + @Suppress("MagicNumber") private fun getNameCollisionPolicyForSelectionIndex(index: Int): NameCollisionPolicy { return when (index) { 1 -> NameCollisionPolicy.OVERWRITE