mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
Added hiding tabs (#183)
This commit is contained in:
@ -51,4 +51,8 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
var disableProximitySensor: Boolean
|
||||
get() = prefs.getBoolean(DISABLE_PROXIMITY_SENSOR, false)
|
||||
set(disableProximitySensor) = prefs.edit().putBoolean(DISABLE_PROXIMITY_SENSOR, disableProximitySensor).apply()
|
||||
|
||||
var showTabs: Int
|
||||
get() = prefs.getInt(SHOW_TABS, ALL_TABS_MASK)
|
||||
set(showTabs) = prefs.edit().putInt(SHOW_TABS, showTabs).apply()
|
||||
}
|
||||
|
@ -1,17 +1,20 @@
|
||||
package com.simplemobiletools.dialer.helpers
|
||||
|
||||
import com.simplemobiletools.commons.helpers.TAB_CONTACTS
|
||||
import com.simplemobiletools.commons.helpers.TAB_FAVORITES
|
||||
import com.simplemobiletools.commons.helpers.TAB_CALL_HISTORY
|
||||
|
||||
// shared prefs
|
||||
const val SPEED_DIAL = "speed_dial"
|
||||
const val REMEMBER_SIM_PREFIX = "remember_sim_"
|
||||
const val GROUP_SUBSEQUENT_CALLS = "group_subsequent_calls"
|
||||
const val OPEN_DIAL_PAD_AT_LAUNCH = "open_dial_pad_at_launch"
|
||||
const val DISABLE_PROXIMITY_SENSOR = "disable_proximity_sensor"
|
||||
const val SHOW_TABS = "show_tabs"
|
||||
|
||||
const val CONTACTS_TAB_MASK = 1
|
||||
const val FAVORITES_TAB_MASK = 2
|
||||
const val RECENTS_TAB_MASK = 4
|
||||
const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_CALL_HISTORY
|
||||
|
||||
val tabsList = arrayListOf(CONTACTS_TAB_MASK, FAVORITES_TAB_MASK, RECENTS_TAB_MASK)
|
||||
val tabsList = arrayListOf(TAB_CONTACTS, TAB_FAVORITES, TAB_CALL_HISTORY)
|
||||
|
||||
private const val PATH = "com.simplemobiletools.dialer.action."
|
||||
const val ACCEPT_CALL = PATH + "accept_call"
|
||||
|
Reference in New Issue
Block a user