From 18a4fe8d1a068879a97ad8729bb7f676857ae1e8 Mon Sep 17 00:00:00 2001 From: Ludvig Krantzen Date: Tue, 3 Oct 2023 17:34:37 +0200 Subject: [PATCH] Fixed charging starting when it shouldn't It no longer starts charging when it shouldn't. After the bottom sheet was closed it always started "charging" no matter what. Now it only starts when you click the button. --- lib/ui/screens/home_page/home_viewmodel.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/screens/home_page/home_viewmodel.dart b/lib/ui/screens/home_page/home_viewmodel.dart index e5ce7f9..6b0ad8b 100644 --- a/lib/ui/screens/home_page/home_viewmodel.dart +++ b/lib/ui/screens/home_page/home_viewmodel.dart @@ -167,7 +167,9 @@ class HomeViewModel extends BaseViewModel { _bottomSheetService .showCustomSheet(variant: SheetType.mapBottomSheet, data: data) .then((value) { - activeTopSheet = true; + if (value != null) { + activeTopSheet = true; + } notifyListeners(); }); }