Initial migration to new Compose settings activity and DataStore

This commit is contained in:
MM20
2022-01-01 20:34:59 +01:00
parent 912982aba8
commit 89db713e24
22 changed files with 659 additions and 41 deletions
@@ -4,7 +4,9 @@ import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.dataStore
val Context.dataStore: DataStore<Settings> by dataStore(
typealias LauncherDataStore = DataStore<Settings>
val Context.dataStore: LauncherDataStore by dataStore(
fileName = "settings.pb",
serializer = SettingsSerializer
)
@@ -0,0 +1,8 @@
package de.mm20.launcher2.preferences
import org.koin.android.ext.koin.androidContext
import org.koin.dsl.module
val preferencesModule = module {
single { androidContext().dataStore }
}