Set account to avoid lateinit property account has not been initialized

This commit is contained in:
Vitor Pamplona 2024-01-30 11:20:25 -05:00
parent e59f676d47
commit 1ac990b67c
2 changed files with 3 additions and 1 deletions

View File

@ -580,7 +580,7 @@ fun BechLink(
)
}
} else if (loadedLink?.nip19 != null) {
Row { ClickableRoute(loadedLink?.nip19!!, accountViewModel, nav) }
ClickableRoute(loadedLink?.nip19!!, accountViewModel, nav)
} else {
val text =
remember(word) {

View File

@ -225,6 +225,7 @@ fun ChatroomListScreenOnlyList(
val observer =
LifecycleEventObserver { _, event ->
if (event == Lifecycle.Event.ON_RESUME) {
NostrChatroomListDataSource.account = accountViewModel.account
NostrChatroomListDataSource.start()
}
}
@ -303,6 +304,7 @@ fun WatchAccountForListScreen(
) {
LaunchedEffect(accountViewModel) {
launch(Dispatchers.IO) {
NostrChatroomListDataSource.account = accountViewModel.account
NostrChatroomListDataSource.start()
knownFeedViewModel.invalidateData(true)
newFeedViewModel.invalidateData(true)