mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding a settings toggle for call confirmation dialog
This commit is contained in:
@ -37,6 +37,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
setupShowPhoneNumbers()
|
||||
setupStartNameWithSurname()
|
||||
setupFilterDuplicates()
|
||||
setupShowCallConfirmation()
|
||||
setupOnContactClick()
|
||||
updateTextColors(settings_holder)
|
||||
}
|
||||
@ -144,4 +145,12 @@ class SettingsActivity : SimpleActivity() {
|
||||
ON_CLICK_VIEW_CONTACT -> R.string.view_contact
|
||||
else -> R.string.edit_contact
|
||||
})
|
||||
|
||||
private fun setupShowCallConfirmation() {
|
||||
settings_show_call_confirmation.isChecked = config.showCallConfirmation
|
||||
settings_show_call_confirmation_holder.setOnClickListener {
|
||||
settings_show_call_confirmation.toggle()
|
||||
config.showCallConfirmation = settings_show_call_confirmation.isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,4 +52,8 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
var showTabs: Int
|
||||
get() = prefs.getInt(SHOW_TABS, ALL_TABS_MASK)
|
||||
set(showTabs) = prefs.edit().putInt(SHOW_TABS, showTabs).apply()
|
||||
|
||||
var showCallConfirmation: Boolean
|
||||
get() = prefs.getBoolean(SHOW_CALL_CONFIRMATION, false)
|
||||
set(showCallConfirmation) = prefs.edit().putBoolean(SHOW_CALL_CONFIRMATION, showCallConfirmation).apply()
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ const val ON_CONTACT_CLICK = "on_contact_click"
|
||||
const val SHOW_CONTACT_FIELDS = "show_contact_fields"
|
||||
const val SHOW_TABS = "show_tabs"
|
||||
const val FILTER_DUPLICATES = "filter_duplicates"
|
||||
const val SHOW_CALL_CONFIRMATION = "show_call_confirmation"
|
||||
|
||||
const val CONTACT_ID = "contact_id"
|
||||
const val SMT_PRIVATE = "smt_private" // used at the contact source of local contacts hidden from other apps
|
||||
|
Reference in New Issue
Block a user