From bad3cfa8f6c4f3f43dfeb2be0688596ddd6b9e4b Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 30 Apr 2026 19:33:52 -0400 Subject: [PATCH] Makes sure relays stay connected in the room activity --- .../nests/room/activity/NestActivity.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/activity/NestActivity.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/activity/NestActivity.kt index f722fbe437..7721f0114e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/activity/NestActivity.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/activity/NestActivity.kt @@ -35,6 +35,11 @@ import androidx.activity.compose.setContent import androidx.appcompat.app.AppCompatActivity import androidx.compose.runtime.mutableStateOf import com.vitorpamplona.amethyst.R +import com.vitorpamplona.amethyst.service.relayClient.authCommand.compose.RelayAuthSubscription +import com.vitorpamplona.amethyst.service.relayClient.reqCommand.account.AccountFilterAssemblerSubscription +import com.vitorpamplona.amethyst.ui.StringResSetup +import com.vitorpamplona.amethyst.ui.screen.ManageRelayServices +import com.vitorpamplona.amethyst.ui.screen.ManageWebOkHttp import com.vitorpamplona.amethyst.ui.theme.AmethystTheme import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.flow.MutableSharedFlow @@ -138,6 +143,18 @@ class NestActivity : AppCompatActivity() { setContent { AmethystTheme { + StringResSetup() + + // Pauses relay services when the app pauses + ManageRelayServices() + ManageWebOkHttp() + + // Adds this account to the authentication procedures for relays. + RelayAuthSubscription(accountViewModel) + + // Loads account information + DMs and Notifications from Relays. + AccountFilterAssemblerSubscription(accountViewModel) + NestActivityContent( addressValue = addressValue, accountViewModel = accountViewModel,