From cc05feae44507f88cb8eb6e7ac346fe9ee2bf762 Mon Sep 17 00:00:00 2001 From: Maximilian Mitchell Date: Sat, 1 May 2021 23:48:55 +0100 Subject: [PATCH] fix badge count fixes #80 --- lib/notifications/notifis.dart | 4 ++++ pubspec.lock | 4 ++-- test/golden-asserts/screen/settings.png | Bin 9138 -> 9137 bytes 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/notifications/notifis.dart b/lib/notifications/notifis.dart index 6ace7a51..ee28ef99 100644 --- a/lib/notifications/notifis.dart +++ b/lib/notifications/notifis.dart @@ -50,6 +50,10 @@ class Notifications extends ChangeNotifier { MenuBarIcon.set('grey'); } + if (canBadge) { + FlutterAppBadger.updateBadgeCount(cnt); + } + return cnt; } diff --git a/pubspec.lock b/pubspec.lock index 094aa950..06f7d7d7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -575,7 +575,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sqflite: dependency: "direct main" description: @@ -631,7 +631,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" timeago: dependency: "direct main" description: diff --git a/test/golden-asserts/screen/settings.png b/test/golden-asserts/screen/settings.png index 8eca86a1911164971ba26067febc1847df36c221..09e43b7812d49036cd33d696e9cc96f54ccb99eb 100644 GIT binary patch literal 9137 zcmeHNX;f3$n!SJ}R#A!(6lIDfDyR$vD2R+tCP%0UA~H(^DMpbwK!RnJj3M$A6cCX_ z1Peoq8bXACmXIie5FyNyAcIT+0)aq=KGC;c_v&8Vud8~!UT?i_{%{HR-20t#_P6)` zzLV4+9PBrKqx=m7K^u=BvpEAnGCLti+I7Qv@JU|uPnW?jsfaW7N1^g}s-M6g>mrUG zcisSg5;j~+fuNnxahpFm$KIXkU&9r|Bo58DMCe958~4Q-@(y2k`m@!2Ih8ZVv~Fmh zu5#tMpn=)Fa_MA`69$!nS9lwjP<8b@Z><9=D zwAD`yp?V0vGT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