store the last used contact source

This commit is contained in:
tibbi
2017-12-26 23:32:33 +01:00
parent 81dfc447dc
commit 44bd03b98a
3 changed files with 7 additions and 0 deletions

View File

@ -27,4 +27,8 @@ class Config(context: Context) : BaseConfig(context) {
var startNameWithSurname: Boolean
get() = prefs.getBoolean(START_NAME_WITH_SURNAME, false)
set(startNameWithSurname) = prefs.edit().putBoolean(START_NAME_WITH_SURNAME, startNameWithSurname).apply()
var lastUsedContactSource: String
get() = prefs.getString(LAST_USED_CONTACT_SOURCE, "")
set(lastUsedContactSource) = prefs.edit().putString(LAST_USED_CONTACT_SOURCE, lastUsedContactSource).apply()
}

View File

@ -4,6 +4,7 @@ package com.simplemobiletools.contacts.helpers
val CALL_CONTACT_ON_CLICK = "call_contact_on_click"
val DISPLAY_CONTACT_SOURCES = "display_contact_sources"
val START_NAME_WITH_SURNAME = "start_name_with_surname"
val LAST_USED_CONTACT_SOURCE = "last_used_contact_source"
val CONTACT_ID = "contact_id"