Default Recent Country Store
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.
max Entries
How many codes to keep. Older entries fall off the end.
file Name
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
max Entries
How many codes to keep. Older entries fall off the end.
file Name
Prefix of the defaults key; override to isolate per-user or per-flow recents.