From 8fd5176e22aee547340550358b17f270da48e6eb Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 6 Jul 2023 21:02:18 -0400 Subject: [PATCH] Makes sure all services stop when the app pauses. --- .../java/com/vitorpamplona/amethyst/ServiceManager.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ServiceManager.kt b/app/src/main/java/com/vitorpamplona/amethyst/ServiceManager.kt index 60091f2fb..9f1b68a32 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ServiceManager.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ServiceManager.kt @@ -13,9 +13,13 @@ import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.amethyst.service.HttpClient import com.vitorpamplona.amethyst.service.NostrAccountDataSource import com.vitorpamplona.amethyst.service.NostrChannelDataSource +import com.vitorpamplona.amethyst.service.NostrChatroomDataSource import com.vitorpamplona.amethyst.service.NostrChatroomListDataSource +import com.vitorpamplona.amethyst.service.NostrCommunityDataSource import com.vitorpamplona.amethyst.service.NostrDiscoveryDataSource +import com.vitorpamplona.amethyst.service.NostrHashtagDataSource import com.vitorpamplona.amethyst.service.NostrHomeDataSource +import com.vitorpamplona.amethyst.service.NostrSearchEventOrUserDataSource import com.vitorpamplona.amethyst.service.NostrSingleChannelDataSource import com.vitorpamplona.amethyst.service.NostrSingleEventDataSource import com.vitorpamplona.amethyst.service.NostrSingleUserDataSource @@ -24,6 +28,7 @@ import com.vitorpamplona.amethyst.service.NostrUserProfileDataSource import com.vitorpamplona.amethyst.service.NostrVideoDataSource import com.vitorpamplona.amethyst.service.relays.Client import com.vitorpamplona.amethyst.ui.actions.ImageUploader +import com.vitorpamplona.amethyst.ui.screen.NostrCommunityFeedViewModel object ServiceManager { private var account: Account? = null @@ -89,9 +94,13 @@ object ServiceManager { NostrAccountDataSource.stop() NostrHomeDataSource.stop() NostrChannelDataSource.stop() + NostrChatroomDataSource.stop() NostrChatroomListDataSource.stop() NostrDiscoveryDataSource.stop() + NostrCommunityDataSource.stop() + NostrHashtagDataSource.stop() + NostrSearchEventOrUserDataSource.stop() NostrSingleChannelDataSource.stop() NostrSingleEventDataSource.stop() NostrSingleUserDataSource.stop()