DefaultRecentCountryStore

fun DefaultRecentCountryStore(context: Context, maxEntries: Int = DefaultRecentCountryStore.DEFAULT_MAX_ENTRIES, fileName: String = DefaultRecentCountryStore.DEFAULT_FILE_NAME): DefaultRecentCountryStore(source)

Creates a DefaultRecentCountryStore backed by a private SharedPreferences file.

Parameters

context

Used once to open the preferences file. Application context is stored, so this is safe to hold in a singleton.

maxEntries

How many codes to keep. Older entries fall off the end.

fileName

Preferences file name; override to isolate per-user or per-flow recents.

fun DefaultRecentCountryStore(maxEntries: Int = DefaultRecentCountryStore.DEFAULT_MAX_ENTRIES, fileName: String = DefaultRecentCountryStore.DEFAULT_FILE_NAME): DefaultRecentCountryStore(source)

Creates a DefaultRecentCountryStore backed by the app's standard NSUserDefaults.

Parameters

maxEntries

How many codes to keep. Older entries fall off the end.

fileName

Prefix of the defaults key; override to isolate per-user or per-flow recents.