From 3a8ae37c09870189fc41784a207d20cc4a01bc88 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Thu, 8 Aug 2024 11:44:46 +0200 Subject: [PATCH] null is not an error it works now :tada: --- .../eu/m724/vastapp/activity/dashboard/DashboardActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/m724/vastapp/activity/dashboard/DashboardActivity.kt b/app/src/main/java/eu/m724/vastapp/activity/dashboard/DashboardActivity.kt index 541ab39..96989d0 100644 --- a/app/src/main/java/eu/m724/vastapp/activity/dashboard/DashboardActivity.kt +++ b/app/src/main/java/eu/m724/vastapp/activity/dashboard/DashboardActivity.kt @@ -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? } }