mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 11:59:19 +01:00
Fix ANR when opening from notification/widget (#8683)
This commit is contained in:
parent
8945ef8880
commit
c288e6b8fa
@ -73,7 +73,6 @@ import kotlinx.coroutines.flow.drop
|
|||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
@ -325,9 +324,11 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent) {
|
override fun onNewIntent(intent: Intent) {
|
||||||
val handle = runBlocking { handleIntentAction(intent) }
|
lifecycleScope.launch {
|
||||||
if (!handle) {
|
val handle = handleIntentAction(intent)
|
||||||
super.onNewIntent(intent)
|
if (!handle) {
|
||||||
|
super.onNewIntent(intent)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user