chore: refactor the internal storage layer #40
@@ -12,8 +12,8 @@ import androidx.activity.viewModels
|
|||||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import su.reya.coop.coop.storage.SecretStore
|
|
||||||
import su.reya.coop.nostr.NostrManager
|
import su.reya.coop.nostr.NostrManager
|
||||||
|
import su.reya.coop.storage.SecretStore
|
||||||
import su.reya.coop.viewmodel.AuthViewModel
|
import su.reya.coop.viewmodel.AuthViewModel
|
||||||
import su.reya.coop.viewmodel.ChatViewModel
|
import su.reya.coop.viewmodel.ChatViewModel
|
||||||
import su.reya.coop.viewmodel.NostrViewModel
|
import su.reya.coop.viewmodel.NostrViewModel
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package su.reya.coop.coop.storage
|
package su.reya.coop.storage
|
||||||
|
|
||||||
import android.security.keystore.KeyGenParameterSpec
|
import android.security.keystore.KeyGenParameterSpec
|
||||||
import android.security.keystore.KeyProperties
|
import android.security.keystore.KeyProperties
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package su.reya.coop.coop.storage
|
package su.reya.coop.storage
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.datastore.preferences.core.edit
|
import androidx.datastore.preferences.core.edit
|
||||||
import androidx.datastore.preferences.core.stringPreferencesKey
|
import androidx.datastore.preferences.core.stringPreferencesKey
|
||||||
import androidx.datastore.preferences.preferencesDataStore
|
import androidx.datastore.preferences.preferencesDataStore
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
import su.reya.coop.storage.SecretStorage
|
|
||||||
|
|
||||||
private val Context.dataStore by preferencesDataStore("secret_store")
|
private val Context.dataStore by preferencesDataStore("secret_store")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user