diff --git a/app/src/main/java/com/koalasat/pokey/ui/home/HomeFragment.kt b/app/src/main/java/com/koalasat/pokey/ui/home/HomeFragment.kt index 8f54f2a..ddc5842 100644 --- a/app/src/main/java/com/koalasat/pokey/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/koalasat/pokey/ui/home/HomeFragment.kt @@ -128,7 +128,7 @@ class HomeFragment : Fragment() { CoroutineScope(Dispatchers.IO).launch { val dao = AppDatabase.getDatabase(requireContext(), "common").applicationDao() val users = dao.getUsers() - if (users.isNotEmpty()) { + if (users.isNotEmpty() || viewModel.serviceStart.value == true) { viewModel.updateServiceStart(!viewModel.serviceStart.value!!) } else { withContext(Dispatchers.Main) {