mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: jvm signature clash error
This commit is contained in:
parent
9df98edca5
commit
4b12ae1531
@ -107,7 +107,7 @@ fun SelectedAppInfoScreen(
|
||||
is SelectedAppInfoDestination.VersionSelector -> VersionSelectorScreen(
|
||||
onBackClick = navController::pop,
|
||||
onAppClick = {
|
||||
vm.setSelectedApp(it)
|
||||
vm.selectedApp = it
|
||||
navController.pop()
|
||||
},
|
||||
viewModel = getViewModel { parametersOf(vm.selectedApp.packageName) }
|
||||
|
@ -35,13 +35,18 @@ class SelectedAppInfoViewModel(input: Params) : ViewModel(), KoinComponent {
|
||||
private val savedStateHandle: SavedStateHandle = get()
|
||||
val prefs: PreferencesManager = get()
|
||||
|
||||
var selectedApp by savedStateHandle.saveable {
|
||||
private var _selectedApp by savedStateHandle.saveable {
|
||||
mutableStateOf(input.app)
|
||||
}
|
||||
private set
|
||||
|
||||
var selectedApp
|
||||
get() = _selectedApp
|
||||
set(value) {
|
||||
invalidateSelectedAppInfo()
|
||||
_selectedApp = value
|
||||
}
|
||||
|
||||
var selectedAppInfo: PackageInfo? by mutableStateOf(null)
|
||||
private set
|
||||
|
||||
init {
|
||||
invalidateSelectedAppInfo()
|
||||
@ -72,11 +77,6 @@ class SelectedAppInfoViewModel(input: Params) : ViewModel(), KoinComponent {
|
||||
selection
|
||||
}
|
||||
|
||||
fun setSelectedApp(new: SelectedApp) {
|
||||
selectedApp = new
|
||||
invalidateSelectedAppInfo()
|
||||
}
|
||||
|
||||
private fun invalidateSelectedAppInfo() = viewModelScope.launch {
|
||||
val info = when (val app = selectedApp) {
|
||||
is SelectedApp.Download -> null
|
||||
|
Loading…
Reference in New Issue
Block a user