From 81f05e1b190274d97427bd6b196cdc6d0a66757c Mon Sep 17 00:00:00 2001 From: validcube Date: Wed, 28 Aug 2024 00:26:41 +0700 Subject: [PATCH] fix: Lack of connectivity toast not showing due to incorrect comparison Signed-off-by: validcube --- lib/ui/views/home/home_viewmodel.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index a8416cb0ab..1f1db588cb 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -85,7 +85,7 @@ class HomeViewModel extends BaseViewModel { AndroidFlutterLocalNotificationsPlugin>() ?.requestNotificationsPermission(); final bool isConnected = - await Connectivity().checkConnectivity() != ConnectivityResult.none; + await Connectivity().checkConnectivity() != [ConnectivityResult.none]; if (!isConnected) { _toast.showBottom(t.homeView.noConnection); } @@ -106,7 +106,8 @@ class HomeViewModel extends BaseViewModel { void navigateToAppInfo(PatchedApplication app, bool isLastPatchedApp) { _navigationService.navigateTo( Routes.appInfoView, - arguments: AppInfoViewArguments(app: app, isLastPatchedApp: isLastPatchedApp), + arguments: + AppInfoViewArguments(app: app, isLastPatchedApp: isLastPatchedApp), ); }