Do not toggle when clicking cards
This commit is contained in:
parent
d10680187d
commit
f5e547944a
@ -84,10 +84,6 @@ class ModuleItem(val item: Module) : ObservableItem<ModuleItem>() {
|
||||
val isUpdated get() = item.updated
|
||||
val isModified get() = isRemoved || isUpdated
|
||||
|
||||
fun toggle() {
|
||||
isEnabled = !isEnabled
|
||||
}
|
||||
|
||||
fun delete(viewModel: ModuleViewModel) {
|
||||
isRemoved = !isRemoved
|
||||
viewModel.updateActiveState()
|
||||
|
@ -179,9 +179,11 @@ class ModuleViewModel(
|
||||
|
||||
override fun refresh(): Job {
|
||||
return viewModelScope.launch {
|
||||
state = State.LOADING
|
||||
loadInstalled()
|
||||
if (itemsRemote.isEmpty())
|
||||
loadRemote()
|
||||
state = State.LOADED
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="@{item.enabled ? 1f : .5f}"
|
||||
android:onClick="@{() -> item.toggle()}"
|
||||
tools:layout_gravity="center"
|
||||
tools:layout_margin="@dimen/l1">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user