Initial migration to new Compose settings activity and DataStore
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
Reference in New Issue
Block a user