mirror of
https://github.com/revanced/revanced-manager-compose-old.git
synced 2025-04-30 06:24:28 +02:00
fix: snapshot state errors when patching
This commit is contained in:
parent
d70e750c36
commit
815a33d471
@ -86,7 +86,6 @@ class PatchingScreenViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
status = Status.Patching
|
|
||||||
app.registerReceiver(
|
app.registerReceiver(
|
||||||
installBroadcastReceiver,
|
installBroadcastReceiver,
|
||||||
IntentFilter().apply {
|
IntentFilter().apply {
|
||||||
@ -111,6 +110,9 @@ class PatchingScreenViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val patcher = viewModelScope.launch(Dispatchers.IO) {
|
private val patcher = viewModelScope.launch(Dispatchers.IO) {
|
||||||
|
withContext(Dispatchers.Main) {
|
||||||
|
status = Status.Patching
|
||||||
|
}
|
||||||
val workdir = createWorkDir()
|
val workdir = createWorkDir()
|
||||||
val wakeLock: PowerManager.WakeLock =
|
val wakeLock: PowerManager.WakeLock =
|
||||||
(app.getSystemService(Context.POWER_SERVICE) as PowerManager).run {
|
(app.getSystemService(Context.POWER_SERVICE) as PowerManager).run {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user