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(
|
is SelectedAppInfoDestination.VersionSelector -> VersionSelectorScreen(
|
||||||
onBackClick = navController::pop,
|
onBackClick = navController::pop,
|
||||||
onAppClick = {
|
onAppClick = {
|
||||||
vm.setSelectedApp(it)
|
vm.selectedApp = it
|
||||||
navController.pop()
|
navController.pop()
|
||||||
},
|
},
|
||||||
viewModel = getViewModel { parametersOf(vm.selectedApp.packageName) }
|
viewModel = getViewModel { parametersOf(vm.selectedApp.packageName) }
|
||||||
|
@ -35,13 +35,18 @@ class SelectedAppInfoViewModel(input: Params) : ViewModel(), KoinComponent {
|
|||||||
private val savedStateHandle: SavedStateHandle = get()
|
private val savedStateHandle: SavedStateHandle = get()
|
||||||
val prefs: PreferencesManager = get()
|
val prefs: PreferencesManager = get()
|
||||||
|
|
||||||
var selectedApp by savedStateHandle.saveable {
|
private var _selectedApp by savedStateHandle.saveable {
|
||||||
mutableStateOf(input.app)
|
mutableStateOf(input.app)
|
||||||
}
|
}
|
||||||
private set
|
|
||||||
|
var selectedApp
|
||||||
|
get() = _selectedApp
|
||||||
|
set(value) {
|
||||||
|
invalidateSelectedAppInfo()
|
||||||
|
_selectedApp = value
|
||||||
|
}
|
||||||
|
|
||||||
var selectedAppInfo: PackageInfo? by mutableStateOf(null)
|
var selectedAppInfo: PackageInfo? by mutableStateOf(null)
|
||||||
private set
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
invalidateSelectedAppInfo()
|
invalidateSelectedAppInfo()
|
||||||
@ -72,11 +77,6 @@ class SelectedAppInfoViewModel(input: Params) : ViewModel(), KoinComponent {
|
|||||||
selection
|
selection
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSelectedApp(new: SelectedApp) {
|
|
||||||
selectedApp = new
|
|
||||||
invalidateSelectedAppInfo()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun invalidateSelectedAppInfo() = viewModelScope.launch {
|
private fun invalidateSelectedAppInfo() = viewModelScope.launch {
|
||||||
val info = when (val app = selectedApp) {
|
val info = when (val app = selectedApp) {
|
||||||
is SelectedApp.Download -> null
|
is SelectedApp.Download -> null
|
||||||
|
Loading…
Reference in New Issue
Block a user