From 04011459878a5f16290614775cd3460307d75e41 Mon Sep 17 00:00:00 2001 From: JHubi1 Date: Tue, 18 Jun 2024 17:11:57 +0200 Subject: [PATCH] Maybe fixed updates this time --- lib/settings/about.dart | 1 + lib/worker/update.dart | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/settings/about.dart b/lib/settings/about.dart index 2461fcd..f157468 100644 --- a/lib/settings/about.dart +++ b/lib/settings/about.dart @@ -26,6 +26,7 @@ class _ScreenSettingsAboutState extends State { super.initState(); WidgetsFlutterBinding.ensureInitialized(); updatesSupported(setState, true); + setState(() {}); if (prefs!.getBool("checkUpdateOnSettingsOpen") ?? false) { checkUpdate(setState); } diff --git a/lib/worker/update.dart b/lib/worker/update.dart index e1fdc8e..3a0873d 100644 --- a/lib/worker/update.dart +++ b/lib/worker/update.dart @@ -43,10 +43,10 @@ Future updatesSupported(Function setState, (installerApps .contains((await InstallReferrer.app).packageName ?? ""))) { returnValue = false; - if (await InstallReferrer.referrer == - InstallationAppReferrer.androidDebug) { - returnValue = true; - } + // if (await InstallReferrer.referrer == + // InstallationAppReferrer.androidDebug) { + // returnValue = true; + // } } if (!repoUrl.startsWith("https://github.com")) { returnValue = false; @@ -114,7 +114,7 @@ void checkUpdate(Function setState) async { }); } catch (e) { setState(() { - updateStatus = "error"; + updateStatus = "notAvailable"; updateLoading = false; }); }