From b10aa5084800aa795686d61d404c54f744fbad33 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 3 May 2024 11:14:43 +0300 Subject: [PATCH] add hideProgress() to onStop in torrserver settings --- .../ui/fragments/main/servsets/ServerSettingsFragment.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/servsets/ServerSettingsFragment.kt b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/servsets/ServerSettingsFragment.kt index f59f0f25..1e30df92 100644 --- a/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/servsets/ServerSettingsFragment.kt +++ b/app/src/main/java/ru/yourok/torrserve/ui/fragments/main/servsets/ServerSettingsFragment.kt @@ -154,6 +154,13 @@ class ServerSettingsFragment : TSFragment() { lifecycleScope.launch { load() } } + override fun onStop() { + lifecycleScope.launch(Dispatchers.Main) { + hideProgress() + } + super.onStop() + } + private suspend fun load() = withContext(Dispatchers.Main) { if (!loaded) { showProgress()