Added gridLayoutSpanCount in Config.kt

This commit is contained in:
merkost 2023-07-12 18:29:02 +10:00
parent d71b795d2f
commit c0037073d1
2 changed files with 9 additions and 1 deletions
app/src/main/kotlin/com/simplemobiletools/dialer/helpers

@ -93,6 +93,10 @@ class Config(context: Context) : BaseConfig(context) {
var viewType: Int var viewType: Int
get() = prefs.getInt(VIEW_TYPE, VIEW_TYPE_LIST) get() = prefs.getInt(VIEW_TYPE, VIEW_TYPE_LIST)
set(viewTypeFiles) = prefs.edit().putInt(VIEW_TYPE, viewTypeFiles).apply() set(viewType) = prefs.edit().putInt(VIEW_TYPE, viewType).apply()
var gridLayoutSpanCount: Int
get() = prefs.getInt(GRID_LAYOUT_SPAN_COUNT, DEFAULT_GRID_SPAN_COUNT)
set(gridLayoutSpanCount) = prefs.edit().putInt(GRID_LAYOUT_SPAN_COUNT, gridLayoutSpanCount).apply()
} }

@ -20,6 +20,8 @@ const val DIALPAD_BEEPS = "dialpad_beeps"
const val HIDE_DIALPAD_NUMBERS = "hide_dialpad_numbers" const val HIDE_DIALPAD_NUMBERS = "hide_dialpad_numbers"
const val ALWAYS_SHOW_FULLSCREEN = "always_show_fullscreen" const val ALWAYS_SHOW_FULLSCREEN = "always_show_fullscreen"
const val VIEW_TYPE = "view_type" const val VIEW_TYPE = "view_type"
const val GRID_LAYOUT_SPAN_COUNT = "grid_layout_span_count"
const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_CALL_HISTORY const val ALL_TABS_MASK = TAB_CONTACTS or TAB_FAVORITES or TAB_CALL_HISTORY
@ -32,3 +34,5 @@ const val DECLINE_CALL = PATH + "decline_call"
const val DIALPAD_TONE_LENGTH_MS = 150L // The length of DTMF tones in milliseconds const val DIALPAD_TONE_LENGTH_MS = 150L // The length of DTMF tones in milliseconds
const val MIN_RECENTS_THRESHOLD = 30 const val MIN_RECENTS_THRESHOLD = 30
const val DEFAULT_GRID_SPAN_COUNT = 3