mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-11 14:42:48 +02:00
Removes one of the Application dependencies in viewmodel
This commit is contained in:
@@ -531,7 +531,9 @@ fun ListContent(
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun RelayStatus(accountViewModel: AccountViewModel) {
|
private fun RelayStatus(accountViewModel: AccountViewModel) {
|
||||||
val connectedRelaysText by accountViewModel.relayStatusFlow().collectAsStateWithLifecycle()
|
val connectedRelaysText by accountViewModel.account.client
|
||||||
|
.relayStatusFlow()
|
||||||
|
.collectAsStateWithLifecycle()
|
||||||
|
|
||||||
RenderRelayStatus(connectedRelaysText)
|
RenderRelayStatus(connectedRelaysText)
|
||||||
}
|
}
|
||||||
|
@@ -1600,8 +1600,6 @@ class AccountViewModel(
|
|||||||
|
|
||||||
fun findUsersStartingWithSync(prefix: String) = LocalCache.findUsersStartingWith(prefix, account)
|
fun findUsersStartingWithSync(prefix: String) = LocalCache.findUsersStartingWith(prefix, account)
|
||||||
|
|
||||||
fun relayStatusFlow() = app.client.relayStatusFlow()
|
|
||||||
|
|
||||||
fun convertAccounts(loggedInAccounts: List<AccountInfo>?): Set<HexKey> =
|
fun convertAccounts(loggedInAccounts: List<AccountInfo>?): Set<HexKey> =
|
||||||
loggedInAccounts
|
loggedInAccounts
|
||||||
?.mapNotNull {
|
?.mapNotNull {
|
||||||
|
Reference in New Issue
Block a user