Skip to content

Commit 47bf6ad

Browse files
committed
squeeze the tab index checker
1 parent df649f5 commit 47bf6ad

File tree

1 file changed

+2
-12
lines changed
  • app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities

1 file changed

+2
-12
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -598,20 +598,10 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
598598
return when (config.defaultTab) {
599599
TAB_LAST_USED -> config.lastUsedViewPagerPage
600600
TAB_CONTACTS -> 0
601-
TAB_FAVORITES -> {
602-
if (showTabsMask and TAB_CONTACTS > 0) {
603-
1
604-
} else {
605-
0
606-
}
607-
}
601+
TAB_FAVORITES -> if (showTabsMask and TAB_CONTACTS > 0) 1 else 0
608602
else -> {
609603
if (showTabsMask and TAB_CONTACTS > 0) {
610-
if (showTabsMask and TAB_FAVORITES > 0) {
611-
2
612-
} else {
613-
1
614-
}
604+
if (showTabsMask and TAB_FAVORITES > 0) 2 else 1
615605
} else {
616606
0
617607
}

0 commit comments

Comments
 (0)