External Sources

This commit is contained in:
tom5079
2021-12-31 14:03:52 +09:00
parent 2e11a4907a
commit f271e61ea2
43 changed files with 148 additions and 6907 deletions

View File

@@ -18,6 +18,7 @@
package xyz.quaver.pupil.proto
import android.app.Application
import android.content.Context
import androidx.datastore.core.CorruptionException
import androidx.datastore.core.DataStore
@@ -41,7 +42,7 @@ object SettingsSerializer : Serializer<Settings> {
override suspend fun writeTo(t: Settings, output: OutputStream) = t.writeTo(output)
}
val Context.settingsDataStore: DataStore<Settings> by dataStore(
val Application.settingsDataStore: DataStore<Settings> by dataStore(
fileName = "settings.proto",
serializer = SettingsSerializer
)