Suppress magic number

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2023-10-24 14:16:30 +02:00
parent 1a77dc90d1
commit ea099b5459
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF

View file

@ -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