mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 18:45:28 +00:00
Only show one notification at a time
This commit is contained in:
parent
d2f8496f4e
commit
b0ab55b0bf
@ -13,7 +13,6 @@ public class CheckUpdates extends ParallelTask<Void, Void, Void> {
|
|||||||
|
|
||||||
private static final String UPDATE_JSON = "https://raw.githubusercontent.com/topjohnwu/MagiskManager/update/magisk_update.json";
|
private static final String UPDATE_JSON = "https://raw.githubusercontent.com/topjohnwu/MagiskManager/update/magisk_update.json";
|
||||||
|
|
||||||
|
|
||||||
private boolean showNotification = false;
|
private boolean showNotification = false;
|
||||||
|
|
||||||
public CheckUpdates(Context context, boolean b) {
|
public CheckUpdates(Context context, boolean b) {
|
||||||
@ -46,11 +45,10 @@ public class CheckUpdates extends ParallelTask<Void, Void, Void> {
|
|||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Void v) {
|
protected void onPostExecute(Void v) {
|
||||||
if (showNotification && magiskManager.updateNotification) {
|
if (showNotification && magiskManager.updateNotification) {
|
||||||
if (magiskManager.magiskVersionCode < magiskManager.remoteMagiskVersionCode) {
|
|
||||||
Utils.showMagiskUpdate(magiskManager);
|
|
||||||
}
|
|
||||||
if (BuildConfig.VERSION_CODE < magiskManager.remoteManagerVersionCode) {
|
if (BuildConfig.VERSION_CODE < magiskManager.remoteManagerVersionCode) {
|
||||||
Utils.showManagerUpdate(magiskManager);
|
Utils.showManagerUpdate(magiskManager);
|
||||||
|
} else if (magiskManager.magiskVersionCode < magiskManager.remoteMagiskVersionCode) {
|
||||||
|
Utils.showMagiskUpdate(magiskManager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
magiskManager.updateCheckDone.trigger();
|
magiskManager.updateCheckDone.trigger();
|
||||||
|
Loading…
Reference in New Issue
Block a user