update home screen

This commit is contained in:
2026-05-06 08:39:19 +07:00
parent 109fe28d48
commit 06252ecbb4
9 changed files with 227 additions and 104 deletions
@@ -90,6 +90,14 @@ class NostrViewModel(
_metadataStore.getOrPut(pubkey) { MutableStateFlow(null) }.value = metadata
}
fun getUserProfile(): StateFlow<Metadata?> {
return try {
getMetadata(nostr.userPubkey!!)
} catch (e: Exception) {
MutableStateFlow(null)
}
}
fun initAndConnect(dbPath: String) {
viewModelScope.launch {
try {
@@ -175,10 +183,11 @@ class NostrViewModel(
}
}
fun import(secret: String) {
fun importIdentity(secret: String) {
// TODO: Implement import
}
fun getChatRooms() {
viewModelScope.launch {
try {