Fix crash if tapping title when opening reader directly
(cherry picked from commit 2f2f59279d828ee689a477104079618d6436827e) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt # app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
This commit is contained in:
parent
dd367f2f70
commit
33b054edfa
@ -144,12 +144,6 @@ class MainActivity : BaseActivity() {
|
||||
// SY <--
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// Do not let the launcher create a new activity http://stackoverflow.com/questions/16283079
|
||||
if (!isTaskRoot) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
// Prevent splash screen showing up on configuration changes
|
||||
val splashScreen = if (savedInstanceState == null) installSplashScreen() else null
|
||||
|
||||
@ -172,6 +166,12 @@ class MainActivity : BaseActivity() {
|
||||
false
|
||||
}
|
||||
|
||||
// Do not let the launcher create a new activity http://stackoverflow.com/questions/16283079
|
||||
if (!isTaskRoot) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
// SY -->
|
||||
@Suppress("KotlinConstantConditions")
|
||||
val hasDebugOverlay = (BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest")
|
||||
|
@ -466,13 +466,6 @@ class ReaderActivity : BaseActivity() {
|
||||
return handled || super.dispatchGenericMotionEvent(event)
|
||||
}
|
||||
|
||||
private fun buildContainerTransform(entering: Boolean): MaterialContainerTransform {
|
||||
return MaterialContainerTransform(this, entering).apply {
|
||||
duration = 350 // ms
|
||||
addTarget(android.R.id.content)
|
||||
}
|
||||
}
|
||||
|
||||
// SY -->
|
||||
fun TextView.textChanges(): Flow<CharSequence> = callbackFlow {
|
||||
val listener = object : TextWatcher {
|
||||
|
Loading…
x
Reference in New Issue
Block a user