add bottom sheet

This commit is contained in:
2026-05-06 09:27:34 +07:00
parent 06252ecbb4
commit eb2f543f53
3 changed files with 71 additions and 1 deletions

View File

@@ -83,6 +83,13 @@ class Nostr {
client?.shutdown()
}
fun exit() {
signer = null
deviceSigner = null
userPubkey = null
contactList = emptyList()
}
suspend fun setKeySigner(keys: Keys) {
try {
signer = NostrSigner.keys(keys)

View File

@@ -187,6 +187,14 @@ class NostrViewModel(
// TODO: Implement import
}
fun logout() {
viewModelScope.launch {
_hasSecret.value = false
_chatRooms.value = emptySet()
secretStore.clear("user_signer")
nostr.exit()
}
}
fun getChatRooms() {
viewModelScope.launch {