mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
Suppress magic number
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
1a77dc90d1
commit
ea099b5459
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue