diff --git a/app/build.gradle b/app/build.gradle index ff0d32ae..25bb7964 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:2794ea914a' + implementation 'com.github.SimpleMobileTools:Simple-Commons:8de9887b36' implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt index 2edb94fd..6fd98956 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt @@ -2,9 +2,14 @@ package com.simplemobiletools.contacts.pro.helpers import android.content.Context import com.simplemobiletools.commons.helpers.BaseConfig +import com.simplemobiletools.commons.helpers.SHOW_TABS class Config(context: Context) : BaseConfig(context) { companion object { fun newInstance(context: Context) = Config(context) } + + var showTabs: Int + get() = prefs.getInt(SHOW_TABS, ALL_TABS_MASK) + set(showTabs) = prefs.edit().putInt(SHOW_TABS, showTabs).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt index 958524b9..6ea62bfb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt @@ -28,6 +28,7 @@ val tabsList = arrayListOf( TAB_FAVORITES, TAB_GROUPS ) +const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_GROUPS // phone number/email types const val CELL = "CELL"