mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 21:45:27 +00:00
Added a condition to hide reboot button when no root is available
This commit is contained in:
parent
cbe3602cb7
commit
dd9129017f
@ -13,8 +13,6 @@
|
||||
|
||||
<import type="com.topjohnwu.magisk.R" />
|
||||
|
||||
<import type="com.topjohnwu.superuser.Shell" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.topjohnwu.magisk.ui.home.HomeViewModel" />
|
||||
@ -51,7 +49,7 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/home_device_action_reboot"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{!Shell.rootAccess()}"
|
||||
invisibleUnless="@{XSUKt.hasRoot}"
|
||||
popupMenu="@{R.menu.menu_reboot}"
|
||||
popupMenuOnClickListener="@{(it) -> viewModel.rebootPressed(it)}"
|
||||
android:layout_width="wrap_content"
|
||||
|
Loading…
Reference in New Issue
Block a user