fix(ComponentPicker): version list not updating when changed
This commit is contained in:
parent
441a84ef66
commit
52bb101f16
3 changed files with 6 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ package com.aliucord.manager.patcher.steps.download
|
|||
|
||||
import android.util.Log
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.runtime.mutableStateListOf
|
||||
import com.aliucord.manager.BuildConfig
|
||||
import com.aliucord.manager.R
|
||||
import com.aliucord.manager.manager.OverlayManager
|
||||
|
|
@ -37,7 +38,7 @@ class DownloadInjectorStep : DownloadStep(), IDexProvider, KoinComponent {
|
|||
get() = paths.cachedInjectorDex(targetVersion, custom = isCustomVersion)
|
||||
|
||||
override suspend fun execute(container: StepRunner) {
|
||||
var customVersions = mutableListOf<SemVer>()
|
||||
var customVersions = mutableStateListOf<SemVer>()
|
||||
.apply { addAll(paths.customInjectorDexs()) }
|
||||
|
||||
// Prompt to select or manage custom versions instead of downloading
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.aliucord.manager.patcher.steps.download
|
|||
|
||||
import android.util.Log
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.runtime.mutableStateListOf
|
||||
import com.aliucord.manager.BuildConfig
|
||||
import com.aliucord.manager.R
|
||||
import com.aliucord.manager.manager.OverlayManager
|
||||
|
|
@ -35,7 +36,7 @@ class DownloadPatchesStep : DownloadStep(), KoinComponent {
|
|||
override val targetFile get() = paths.cachedSmaliPatches(targetVersion, isCustomVersion)
|
||||
|
||||
override suspend fun execute(container: StepRunner) {
|
||||
var customVersions = mutableListOf<SemVer>()
|
||||
var customVersions = mutableStateListOf<SemVer>()
|
||||
.apply { addAll(paths.customSmaliPatches()) }
|
||||
|
||||
// Prompt to select or manage custom versions instead of downloading
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
|||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.runtime.snapshots.SnapshotStateList
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
|
|
@ -19,7 +20,7 @@ import com.aliucord.manager.network.utils.SemVer
|
|||
@Composable
|
||||
fun CustomComponentVersionPicker(
|
||||
componentTitle: String,
|
||||
versions: List<SemVer>,
|
||||
versions: SnapshotStateList<SemVer>,
|
||||
onConfirm: (SemVer) -> Unit,
|
||||
onDelete: (SemVer) -> Unit,
|
||||
onCancel: () -> Unit,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue