From b0ab55b0bfbbf0b11acd8332f3a0972e78c19027 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 13 Jul 2017 14:51:12 +0800 Subject: [PATCH] Only show one notification at a time --- .../main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java b/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java index 38ffd0028..2da16d2f5 100644 --- a/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java +++ b/app/src/main/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java @@ -13,7 +13,6 @@ public class CheckUpdates extends ParallelTask { private static final String UPDATE_JSON = "https://raw.githubusercontent.com/topjohnwu/MagiskManager/update/magisk_update.json"; - private boolean showNotification = false; public CheckUpdates(Context context, boolean b) { @@ -46,11 +45,10 @@ public class CheckUpdates extends ParallelTask { @Override protected void onPostExecute(Void v) { if (showNotification && magiskManager.updateNotification) { - if (magiskManager.magiskVersionCode < magiskManager.remoteMagiskVersionCode) { - Utils.showMagiskUpdate(magiskManager); - } if (BuildConfig.VERSION_CODE < magiskManager.remoteManagerVersionCode) { Utils.showManagerUpdate(magiskManager); + } else if (magiskManager.magiskVersionCode < magiskManager.remoteMagiskVersionCode) { + Utils.showMagiskUpdate(magiskManager); } } magiskManager.updateCheckDone.trigger();