From 2b4d47d2f615d7270d21e15dd39cd202bb6d11f4 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:51:39 +0530 Subject: [PATCH] [auth] Bump version --- auth/lib/services/update_service.dart | 20 ++++++++++++-------- auth/pubspec.yaml | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/auth/lib/services/update_service.dart b/auth/lib/services/update_service.dart index c943d4f595..716d553f1b 100644 --- a/auth/lib/services/update_service.dart +++ b/auth/lib/services/update_service.dart @@ -59,9 +59,9 @@ class UpdateService { return _latestVersion; } - Future showUpdateNotification() async { + Future showUpdateNotification() async { if (!isIndependent()) { - return; + return false; } final shouldUpdate = await this.shouldUpdate(); final lastNotificationShownTime = @@ -72,15 +72,19 @@ class UpdateService { if (shouldUpdate && hasBeen3DaysSinceLastNotification && _latestVersion!.shouldNotify!) { - unawaited( - NotificationService.instance.showNotification( - "Update available", - "Click to install our best version yet", - ), - ); await _prefs.setInt(kUpdateAvailableShownTimeKey, now); + if (Platform.isAndroid) { + unawaited( + NotificationService.instance.showNotification( + "Update available", + "Click to install our best version yet", + ), + ); + } + return true; } else { _logger.info("Debouncing notification"); + return false; } } diff --git a/auth/pubspec.yaml b/auth/pubspec.yaml index 3e3af92b4a..005f6bd53e 100644 --- a/auth/pubspec.yaml +++ b/auth/pubspec.yaml @@ -1,6 +1,6 @@ name: ente_auth description: ente two-factor authenticator -version: 4.1.4+414 +version: 4.1.4+415 publish_to: none environment: