fix build

This commit is contained in:
greenart7c3
2023-12-22 14:46:03 -03:00
parent de2950924c
commit cb210d1b82
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">
<application
android:name=".Nostrsigner"
android:name=".nostrsigner"
android:allowBackup="false"
android:configChanges="orientation|screenSize|screenLayout"
android:dataExtractionRules="@xml/data_extraction_rules"
@@ -11,7 +11,7 @@ object EncryptedStorage {
}
fun preferences(npub: String? = null): EncryptedSharedPreferences {
val context = Nostrsigner.instance
val context = nostrsigner.instance
val masterKey: MasterKey = MasterKey.Builder(context, MasterKey.DEFAULT_MASTER_KEY_ALIAS)
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
.build()
@@ -86,7 +86,7 @@ object LocalPreferences {
}
private val prefsDirPath: String
get() = "${Nostrsigner.instance.filesDir.parent}/shared_prefs/"
get() = "${nostrsigner.instance.filesDir.parent}/shared_prefs/"
private fun addAccount(npub: String) {
val accounts = savedAccounts().toMutableList()
@@ -135,7 +135,7 @@ object LocalPreferences {
private fun encryptedPreferences(npub: String? = null): SharedPreferences {
return if (BuildConfig.DEBUG && DEBUG_PLAINTEXT_PREFERENCES) {
val preferenceFile = if (npub == null) DEBUG_PREFERENCES_NAME else "${DEBUG_PREFERENCES_NAME}_$npub"
Nostrsigner.instance.getSharedPreferences(preferenceFile, Context.MODE_PRIVATE)
nostrsigner.instance.getSharedPreferences(preferenceFile, Context.MODE_PRIVATE)
} else {
return EncryptedStorage.preferences(npub)
}
@@ -2,14 +2,14 @@ package com.greenart7c3.nostrsigner
import android.app.Application
class Nostrsigner : Application() {
class nostrsigner : Application() {
override fun onCreate() {
super.onCreate()
instance = this
}
companion object {
lateinit var instance: Nostrsigner
lateinit var instance: nostrsigner
private set
}
}