You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Allow offline hide manager
This commit is contained in:
@@ -100,10 +100,6 @@ object Hide : BaseSettingsItem.Input() {
|
||||
|
||||
override fun getView(context: Context) = DialogSettingsAppNameBinding
|
||||
.inflate(LayoutInflater.from(context)).also { it.data = this }.root
|
||||
|
||||
override fun refresh() {
|
||||
isEnabled = Info.remote.stub.versionCode > 0
|
||||
}
|
||||
}
|
||||
|
||||
object Restore : BaseSettingsItem.Blank() {
|
||||
|
||||
@@ -56,10 +56,7 @@ class SettingsViewModel : BaseViewModel(), BaseSettingsItem.Callback {
|
||||
))
|
||||
if (Info.env.isActive) {
|
||||
if (Const.USER_ID == 0) {
|
||||
if (hidden)
|
||||
list.add(Restore)
|
||||
else if (Info.isConnected.get())
|
||||
list.add(Hide)
|
||||
if (hidden) list.add(Restore) else list.add(Hide)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user