mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-18 20:40:46 +01:00
Merge pull request #739 from Aga-C/fix-show-default-tab
Fixed showing default tab
This commit is contained in:
commit
057b3e7a99
@ -154,11 +154,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
storeStateVariables()
|
storeStateVariables()
|
||||||
|
config.lastUsedViewPagerPage = viewpager.currentItem
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
config.lastUsedViewPagerPage = viewpager.currentItem
|
|
||||||
if (!isChangingConfigurations) {
|
if (!isChangingConfigurations) {
|
||||||
ContactsDatabase.destroyInstance()
|
ContactsDatabase.destroyInstance()
|
||||||
}
|
}
|
||||||
@ -595,8 +595,20 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||||||
TAB_CONTACTS -> 0
|
TAB_CONTACTS -> 0
|
||||||
TAB_FAVORITES -> if (showTabsMask and TAB_CONTACTS > 0) 1 else 0
|
TAB_FAVORITES -> if (showTabsMask and TAB_CONTACTS > 0) 1 else 0
|
||||||
else -> {
|
else -> {
|
||||||
|
if (showTabsMask and TAB_GROUPS > 0) {
|
||||||
if (showTabsMask and TAB_CONTACTS > 0) {
|
if (showTabsMask and TAB_CONTACTS > 0) {
|
||||||
if (showTabsMask and TAB_FAVORITES > 0) 2 else 1
|
if (showTabsMask and TAB_FAVORITES > 0) {
|
||||||
|
2
|
||||||
|
} else {
|
||||||
|
1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (showTabsMask and TAB_FAVORITES > 0) {
|
||||||
|
1
|
||||||
|
} else {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user