diff --git a/app/src/main/java/io/legado/app/utils/ContextExtensions.kt b/app/src/main/java/io/legado/app/utils/ContextExtensions.kt index 3f287764c..490ac0f36 100644 --- a/app/src/main/java/io/legado/app/utils/ContextExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/ContextExtensions.kt @@ -28,7 +28,10 @@ import java.io.File import java.io.FileOutputStream inline fun Context.startActivity(configIntent: Intent.() -> Unit = {}) { - startActivity(Intent(this, A::class.java).apply(configIntent)) + val intent = Intent(this, A::class.java) + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + intent.apply(configIntent) + startActivity(intent) } inline fun Context.startService(configIntent: Intent.() -> Unit = {}) {