Skip to content

Commit fb6be67

Browse files
authored
Merge pull request #956 from ismailnurudeen/fix/show-tab-pref
fix: move show tab pref to own config
2 parents 9c1b86f + 1e4fd30 commit fb6be67

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ android {
6363
}
6464

6565
dependencies {
66-
implementation 'com.github.SimpleMobileTools:Simple-Commons:2794ea914a'
66+
implementation 'com.github.SimpleMobileTools:Simple-Commons:8de9887b36'
6767
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
6868
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
6969
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Config.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ package com.simplemobiletools.contacts.pro.helpers
22

33
import android.content.Context
44
import com.simplemobiletools.commons.helpers.BaseConfig
5+
import com.simplemobiletools.commons.helpers.SHOW_TABS
56

67
class Config(context: Context) : BaseConfig(context) {
78
companion object {
89
fun newInstance(context: Context) = Config(context)
910
}
11+
12+
var showTabs: Int
13+
get() = prefs.getInt(SHOW_TABS, ALL_TABS_MASK)
14+
set(showTabs) = prefs.edit().putInt(SHOW_TABS, showTabs).apply()
1015
}

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/Constants.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ val tabsList = arrayListOf(
2828
TAB_FAVORITES,
2929
TAB_GROUPS
3030
)
31+
const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_GROUPS
3132

3233
// phone number/email types
3334
const val CELL = "CELL"

0 commit comments

Comments
 (0)