fix: move show tab pref to own config
This commit is contained in:
parent
1ec5277dc4
commit
1e4fd30949
|
@ -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'
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue