add bottom sheet
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user