Show magisk update notification only when magisk is installed

This commit is contained in:
vvb2060 2020-06-26 15:55:49 +08:00 committed by John Wu
parent c881fd4964
commit fc6ef7dd57

View File

@ -21,7 +21,7 @@ class UpdateCheckService(context: Context, workerParams: WorkerParameters)
magiskRepo.fetchUpdate().blockingGet()
if (BuildConfig.VERSION_CODE < Info.remote.app.versionCode)
Notifications.managerUpdate(applicationContext)
else if (Info.env.magiskVersionCode < Info.remote.magisk.versionCode)
else if (Info.env.isActive && Info.env.magiskVersionCode < Info.remote.magisk.versionCode)
Notifications.magiskUpdate(applicationContext)
Result.success()
}.getOrElse {