Skip to content

Commit

Permalink
fix(ComponentPicker): version list not updating when changed
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Jan 11, 2025
1 parent 441a84e commit 52bb101
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 52bb101

Please sign in to comment.