null is not an error

it works now 🎉
This commit is contained in:
Minecon724 2024-08-08 11:44:46 +02:00
parent 439b8aa4f0
commit 3a8ae37c09
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -52,7 +52,8 @@ class DashboardActivity : ComponentActivity() {
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
dashboardViewModel.refreshError.collect {
Toast.makeText(baseContext, it, Toast.LENGTH_SHORT).show()
if (it != null)
Toast.makeText(baseContext, it, Toast.LENGTH_SHORT).show()
} // TODO any better way?
}
}