From adc4e7c2b4f9b21a11dea674e1c918b67591628c Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Mon, 5 Aug 2024 16:30:12 -0400 Subject: [PATCH] Fix error after fgbg package update in previous commit --- lib/providers/apps_provider.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index e3b9595..8e8dfa9 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -367,7 +367,7 @@ class AppsProvider with ChangeNotifier { AppsProvider({isBg = false}) { // Subscribe to changes in the app foreground status - foregroundStream = FGBGEvents.stream.asBroadcastStream(); + foregroundStream = FGBGEvents.instance.stream.asBroadcastStream(); foregroundSubscription = foregroundStream?.listen((event) async { isForeground = event == FGBGType.foreground; if (isForeground) { @@ -572,7 +572,7 @@ class AppsProvider with ChangeNotifier { if (!isForeground) { await notificationsProvider.notify(completeInstallationNotification, cancelExisting: true); - while (await FGBGEvents.stream.first != FGBGType.foreground) {} + while (await FGBGEvents.instance.stream.first != FGBGType.foreground) {} await notificationsProvider.cancel(completeInstallationNotification.id); } }