mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-21 10:38:55 +02:00
Add migration config screen to select and prioritize target sources (#2144)
This commit is contained in:
@@ -24,6 +24,18 @@ interface PreferenceStore {
|
||||
fun getAll(): Map<String, *>
|
||||
}
|
||||
|
||||
fun PreferenceStore.getLongArray(
|
||||
key: String,
|
||||
defaultValue: List<Long>,
|
||||
): Preference<List<Long>> {
|
||||
return getObject(
|
||||
key = key,
|
||||
defaultValue = defaultValue,
|
||||
serializer = { it.joinToString(",") },
|
||||
deserializer = { it.split(",").mapNotNull { l -> l.toLongOrNull() } },
|
||||
)
|
||||
}
|
||||
|
||||
inline fun <reified T : Enum<T>> PreferenceStore.getEnum(
|
||||
key: String,
|
||||
defaultValue: T,
|
||||
|
Reference in New Issue
Block a user