mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
Show correct message
This commit is contained in:
parent
0ec473195d
commit
04a4265ef3
@ -401,15 +401,6 @@ public class MagiskFragment extends Fragment
|
||||
rootStatusIcon.setImageResource(image);
|
||||
rootStatusIcon.setColorFilter(color);
|
||||
|
||||
if (!Shell.rootAccess()) {
|
||||
installText.setText(R.string.install);
|
||||
} else {
|
||||
if (magiskManager.remoteMagiskVersionCode > magiskManager.magiskVersionCode) {
|
||||
installText.setText(R.string.update);
|
||||
} else {
|
||||
installText.setText(R.string.reinstall);
|
||||
}
|
||||
|
||||
List<String> items = new ArrayList<>();
|
||||
if (magiskManager.bootBlock != null) {
|
||||
items.add(getString(R.string.auto_detect, magiskManager.bootBlock));
|
||||
@ -423,7 +414,6 @@ public class MagiskFragment extends Fragment
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
spinner.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateCheckUI() {
|
||||
int image, color;
|
||||
@ -438,6 +428,12 @@ public class MagiskFragment extends Fragment
|
||||
magiskUpdateText.setText(getString(R.string.install_magisk_title, "v" + magiskManager.remoteMagiskVersionString));
|
||||
}
|
||||
|
||||
if (magiskManager.remoteMagiskVersionCode > magiskManager.magiskVersionCode) {
|
||||
installText.setText(R.string.update);
|
||||
} else {
|
||||
installText.setText(R.string.install);
|
||||
}
|
||||
|
||||
magiskUpdateIcon.setImageResource(image);
|
||||
magiskUpdateIcon.setColorFilter(color);
|
||||
magiskUpdateIcon.setVisibility(View.VISIBLE);
|
||||
|
@ -411,6 +411,7 @@
|
||||
android:ems="10"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
Loading…
Reference in New Issue
Block a user