Skip to content

Commit

Permalink
Suppress magic number
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Oct 24, 2023
1 parent 1a77dc9 commit ea099b5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ea099b5

Please sign in to comment.