remember the last used viewpager page

This commit is contained in:
tibbi
2017-12-29 23:52:00 +01:00
parent 1e0d8f383d
commit 1771e92f11
4 changed files with 19 additions and 5 deletions

View File

@ -31,4 +31,8 @@ class Config(context: Context) : BaseConfig(context) {
var lastUsedContactSource: String
get() = prefs.getString(LAST_USED_CONTACT_SOURCE, "")
set(lastUsedContactSource) = prefs.edit().putString(LAST_USED_CONTACT_SOURCE, lastUsedContactSource).apply()
var lastUsedViewPagerPage: Int
get() = prefs.getInt(LAST_USED_VIEW_PAGER_PAGE, 0)
set(lastUsedViewPagerPage) = prefs.edit().putInt(LAST_USED_VIEW_PAGER_PAGE, lastUsedViewPagerPage).apply()
}

View File

@ -5,6 +5,7 @@ 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 LAST_USED_VIEW_PAGER_PAGE = "last_used_view_pager_page"
val CONTACT_ID = "contact_id"