mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-06 14:49:17 +02:00
Merge pull request #1177 from greenart7c3/main
Fix initial decryption of mute lists when using amber
This commit is contained in:
commit
924baf0de3
@ -20,7 +20,9 @@
|
|||||||
*/
|
*/
|
||||||
package com.vitorpamplona.amethyst.model
|
package com.vitorpamplona.amethyst.model
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.runtime.Stable
|
import androidx.compose.runtime.Stable
|
||||||
|
import com.vitorpamplona.amethyst.Amethyst
|
||||||
import com.vitorpamplona.amethyst.service.Nip96MediaServers
|
import com.vitorpamplona.amethyst.service.Nip96MediaServers
|
||||||
import com.vitorpamplona.amethyst.ui.tor.TorSettings
|
import com.vitorpamplona.amethyst.ui.tor.TorSettings
|
||||||
import com.vitorpamplona.amethyst.ui.tor.TorSettingsFlow
|
import com.vitorpamplona.amethyst.ui.tor.TorSettingsFlow
|
||||||
@ -120,7 +122,6 @@ class AccountSettings(
|
|||||||
val pendingAttestations: MutableStateFlow<Map<HexKey, String>> = MutableStateFlow<Map<HexKey, String>>(mapOf()),
|
val pendingAttestations: MutableStateFlow<Map<HexKey, String>> = MutableStateFlow<Map<HexKey, String>>(mapOf()),
|
||||||
) {
|
) {
|
||||||
val saveable = MutableStateFlow(AccountSettingsUpdater(this))
|
val saveable = MutableStateFlow(AccountSettingsUpdater(this))
|
||||||
|
|
||||||
val syncedSettings: AccountSyncedSettings =
|
val syncedSettings: AccountSyncedSettings =
|
||||||
backupSyncedSettings?.let { AccountSyncedSettings(it) }
|
backupSyncedSettings?.let { AccountSyncedSettings(it) }
|
||||||
?: AccountSyncedSettings(AccountSyncedSettingsInternal())
|
?: AccountSyncedSettings(AccountSyncedSettingsInternal())
|
||||||
@ -141,7 +142,19 @@ class AccountSettings(
|
|||||||
} else {
|
} else {
|
||||||
when (val packageName = externalSignerPackageName) {
|
when (val packageName = externalSignerPackageName) {
|
||||||
null -> NostrSignerInternal(keyPair)
|
null -> NostrSignerInternal(keyPair)
|
||||||
else -> NostrSignerExternal(keyPair.pubKey.toHexKey(), ExternalSignerLauncher(keyPair.pubKey.toHexKey(), packageName))
|
else -> {
|
||||||
|
val externalSignerLauncher = ExternalSignerLauncher(keyPair.pubKey.toHexKey(), packageName)
|
||||||
|
// TODO: How to handle the launcher here?
|
||||||
|
try {
|
||||||
|
externalSignerLauncher.registerLauncher(
|
||||||
|
launcher = { },
|
||||||
|
contentResolver = Amethyst.instance::contentResolverFn,
|
||||||
|
)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.d("AccountSettings", "Failed to initialize external signer", e)
|
||||||
|
}
|
||||||
|
NostrSignerExternal(keyPair.pubKey.toHexKey(), externalSignerLauncher)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user