Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Dec 5, 2024
1 parent e190ef7 commit 9381282
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9381282

Please sign in to comment.