mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
refactor(settings): Migrate preferences from SharedPreferences to DataStore
Replace FlowPreference<T> wrapping SharedPreferences with DataStoreValue<T> wrapping AndroidX DataStore. Includes SharedPreferencesMigration for preserving existing user data, kotlinx-serialization for complex types (replacing Moshi for preferences), and comprehensive unit tests for the new infrastructure.
This commit is contained in:
@@ -131,6 +131,10 @@ fun DependencyHandlerScope.addSerialization() {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Serialization.core}")
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.addDataStore() {
|
||||
implementation("androidx.datastore:datastore-preferences:1.1.4")
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.addGlance() {
|
||||
implementation("androidx.glance:glance-appwidget:${Versions.Glance.core}")
|
||||
implementation("androidx.glance:glance-material3:${Versions.Glance.core}")
|
||||
|
||||
Reference in New Issue
Block a user