diff --git a/build.gradle b/build.gradle index 585a73054..2db87bdea 100644 --- a/build.gradle +++ b/build.gradle @@ -24,9 +24,6 @@ repositories { maven { url "https://raw.github.com/whispersystems/maven/master/smil/releases/" } - maven { - url "https://raw.github.com/whispersystems/maven/master/shortcutbadger/releases/" - } maven { url "https://raw.github.com/whispersystems/maven/master/photoview/releases/" } @@ -59,7 +56,7 @@ dependencies { compile 'org.whispersystems:libpastelog:1.0.7' compile 'org.whispersystems:signal-service-android:2.4.7' - compile 'me.leolin:ShortcutBadger:1.1.0-WS1' + compile "me.leolin:ShortcutBadger:1.1.10@aar" compile 'se.emilsjolander:stickylistheaders:2.7.0' compile 'com.jpardogo.materialtabstrip:library:1.0.9' compile 'org.w3c:smil:1.0.0' @@ -124,7 +121,7 @@ dependencyVerification { 'org.whispersystems:jobmanager:506f679fc2fcf7bb6d10f00f41d6f6ea0abf75c70dc95b913398661ad538a181', 'org.whispersystems:libpastelog:bb331d9a98240fc139101128ba836c1edec3c40e000597cdbb29ebf4cbf34d88', 'org.whispersystems:signal-service-android:0b5e607c1ffdbc90f8b1117c43ceaba62e3e19c01c8d29b3e1bf57cffce07f2b', - 'me.leolin:ShortcutBadger:3142d017234bfa0cdd69ccded7cc5ea63f13b97574803c8c616c9bbeaad33ad9', + 'me.leolin:ShortcutBadger:ace05a2b28547eece1680c7127608b0902bb3283aa91319cd6baca724451a033', 'se.emilsjolander:stickylistheaders:a08ca948aa6b220f09d82f16bbbac395f6b78897e9eeac6a9f0b0ba755928eeb', 'com.jpardogo.materialtabstrip:library:c6ef812fba4f74be7dc4a905faa4c2908cba261a94c13d4f96d5e67e4aad4aaa', 'org.w3c:smil:085dc40f2bb249651578bfa07499fd08b16ad0886dbe2c4078586a408da62f9b', diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java index 5b8f91ed4..8dc15df08 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java @@ -500,7 +500,8 @@ public class MessageNotifier { private static void updateBadge(Context context, int count) { try { - ShortcutBadger.setBadge(context.getApplicationContext(), count); + if (count == 0) ShortcutBadger.removeCount(context); + else ShortcutBadger.applyCount(context, count); } catch (Throwable t) { // NOTE :: I don't totally trust this thing, so I'm catching // everything.