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 <--
|
// SY <--
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
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
|
// Prevent splash screen showing up on configuration changes
|
||||||
val splashScreen = if (savedInstanceState == null) installSplashScreen() else null
|
val splashScreen = if (savedInstanceState == null) installSplashScreen() else null
|
||||||
|
|
||||||
@ -172,6 +166,12 @@ class MainActivity : BaseActivity() {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not let the launcher create a new activity http://stackoverflow.com/questions/16283079
|
||||||
|
if (!isTaskRoot) {
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
@Suppress("KotlinConstantConditions")
|
@Suppress("KotlinConstantConditions")
|
||||||
val hasDebugOverlay = (BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest")
|
val hasDebugOverlay = (BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest")
|
||||||
|
@ -466,13 +466,6 @@ class ReaderActivity : BaseActivity() {
|
|||||||
return handled || super.dispatchGenericMotionEvent(event)
|
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 -->
|
// SY -->
|
||||||
fun TextView.textChanges(): Flow<CharSequence> = callbackFlow {
|
fun TextView.textChanges(): Flow<CharSequence> = callbackFlow {
|
||||||
val listener = object : TextWatcher {
|
val listener = object : TextWatcher {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user