From 58ba0b0b4eb39c0e7a1f3b0dc783dde1f2863371 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 27 Dec 2018 18:11:03 +0800 Subject: [PATCH] Stop showing dialog when update available --- .../topjohnwu/magisk/fragments/MagiskFragment.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java index 5f45eabdb..d0e12110a 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java @@ -111,8 +111,6 @@ public class MagiskFragment extends BaseFragment @OnClick(R.id.install_button) void install() { - shownDialog = true; - // Show Manager update first if (Data.remoteManagerVersionCode > BuildConfig.VERSION_CODE) { new ManagerInstallDialog((BaseActivity) requireActivity()).show(); @@ -267,13 +265,9 @@ public class MagiskFragment extends BaseFragment magiskUpdateProgress.setVisibility(View.GONE); mSwipeRefreshLayout.setRefreshing(false); - if (!shownDialog) { - if (Data.remoteMagiskVersionCode > Data.magiskVersionCode - || Data.remoteManagerVersionCode > BuildConfig.VERSION_CODE) { - install(); - } else if (!ShellUtils.fastCmdResult("env_check")) { - new EnvFixDialog(requireActivity()).show(); - } + if (!shownDialog && !ShellUtils.fastCmdResult("env_check")) { + shownDialog = true; + new EnvFixDialog(requireActivity()).show(); } }