Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
f5e54794
Commit
f5e54794
authored
Aug 10, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not toggle when clicking cards
parent
d1068018
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
ModuleRvItem.kt
...om/topjohnwu/magisk/model/entity/recycler/ModuleRvItem.kt
+0
-4
ModuleViewModel.kt
...in/java/com/topjohnwu/magisk/ui/module/ModuleViewModel.kt
+2
-0
item_module_md2.xml
app/src/main/res/layout/item_module_md2.xml
+0
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/model/entity/recycler/ModuleRvItem.kt
View file @
f5e54794
...
@@ -84,10 +84,6 @@ class ModuleItem(val item: Module) : ObservableItem<ModuleItem>() {
...
@@ -84,10 +84,6 @@ class ModuleItem(val item: Module) : ObservableItem<ModuleItem>() {
val
isUpdated
get
()
=
item
.
updated
val
isUpdated
get
()
=
item
.
updated
val
isModified
get
()
=
isRemoved
||
isUpdated
val
isModified
get
()
=
isRemoved
||
isUpdated
fun
toggle
()
{
isEnabled
=
!
isEnabled
}
fun
delete
(
viewModel
:
ModuleViewModel
)
{
fun
delete
(
viewModel
:
ModuleViewModel
)
{
isRemoved
=
!
isRemoved
isRemoved
=
!
isRemoved
viewModel
.
updateActiveState
()
viewModel
.
updateActiveState
()
...
...
app/src/main/java/com/topjohnwu/magisk/ui/module/ModuleViewModel.kt
View file @
f5e54794
...
@@ -179,9 +179,11 @@ class ModuleViewModel(
...
@@ -179,9 +179,11 @@ class ModuleViewModel(
override
fun
refresh
():
Job
{
override
fun
refresh
():
Job
{
return
viewModelScope
.
launch
{
return
viewModelScope
.
launch
{
state
=
State
.
LOADING
loadInstalled
()
loadInstalled
()
if
(
itemsRemote
.
isEmpty
())
if
(
itemsRemote
.
isEmpty
())
loadRemote
()
loadRemote
()
state
=
State
.
LOADED
}
}
}
}
...
...
app/src/main/res/layout/item_module_md2.xml
View file @
f5e54794
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:alpha=
"@{item.enabled ? 1f : .5f}"
android:alpha=
"@{item.enabled ? 1f : .5f}"
android:onClick=
"@{() -> item.toggle()}"
tools:layout_gravity=
"center"
tools:layout_gravity=
"center"
tools:layout_margin=
"@dimen/l1"
>
tools:layout_margin=
"@dimen/l1"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment