Skip to content

Commit

Permalink
Action.sh Suppport 10/13
Browse files Browse the repository at this point in the history
  • Loading branch information
1q23lyc45 committed Dec 20, 2024
1 parent bef8ee0 commit 93252ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class LocalModuleRvItem(
override val layoutRes = R.layout.item_module_md2

val showNotice: Boolean
val showAction: Boolean
val noticeText: TextHolder

init {
Expand All @@ -34,6 +35,7 @@ class LocalModuleRvItem(
showNotice = zygiskUnloaded ||
(Info.isZygiskEnabled && isRiru) ||
(!Info.isZygiskEnabled && isZygisk)
showAction = item.hasAction && !showNotice
noticeText =
when {
zygiskUnloaded -> R.string.zygisk_module_unloaded.asText()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import androidx.databinding.Bindable
import androidx.lifecycle.MutableLiveData
import com.topjohnwu.magisk.BR
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.MainDirections
import com.topjohnwu.magisk.arch.AsyncLoadViewModel
import com.topjohnwu.magisk.core.Const
import com.topjohnwu.magisk.core.Info
import com.topjohnwu.magisk.core.base.ContentResultCallback
import com.topjohnwu.magisk.core.model.module.LocalModule
Expand Down Expand Up @@ -95,6 +97,10 @@ class ModuleViewModel : AsyncLoadViewModel() {
}
}

fun runAction(id: String, name: String) {
MainDirections.actionActionFragment(id, name).navigate()
}

companion object {
private val uri = MutableLiveData<Uri?>()
}
Expand Down

0 comments on commit 93252ad

Please sign in to comment.