mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-12 17:43:36 +00:00
Disable installation while downloading metadata
This commit is contained in:
parent
60e89a7d22
commit
3f81f9371f
@ -125,14 +125,18 @@ class HomeViewModel(
|
|||||||
|
|
||||||
fun onDeletePressed() = UninstallDialog().publish()
|
fun onDeletePressed() = UninstallDialog().publish()
|
||||||
|
|
||||||
fun onManagerPressed() =
|
fun onManagerPressed() = when (state) {
|
||||||
if (isConnected.get()) ManagerInstallDialog().publish()
|
State.LOADED -> ManagerInstallDialog().publish()
|
||||||
else SnackbarEvent(R.string.no_connection).publish()
|
State.LOADING -> SnackbarEvent(R.string.loading).publish()
|
||||||
|
else -> SnackbarEvent(R.string.no_connection).publish()
|
||||||
|
}
|
||||||
|
|
||||||
fun onMagiskPressed() = if (isConnected.get()) withExternalRW {
|
fun onMagiskPressed() = when (state) {
|
||||||
HomeFragmentDirections.actionHomeFragmentToInstallFragment().publish()
|
State.LOADED -> withExternalRW {
|
||||||
} else {
|
HomeFragmentDirections.actionHomeFragmentToInstallFragment().publish()
|
||||||
SnackbarEvent(R.string.no_connection).publish()
|
}
|
||||||
|
State.LOADING -> SnackbarEvent(R.string.loading).publish()
|
||||||
|
else -> SnackbarEvent(R.string.no_connection).publish()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onSafetyNetPressed() =
|
fun onSafetyNetPressed() =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user