mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-29 12:23:14 -05:00
Fix crash if tapping title when opening reader directly
This commit is contained in:
parent
4992f87cb1
commit
2f2f59279d
2 changed files with 6 additions and 13 deletions
|
@ -114,12 +114,6 @@ class MainActivity : BaseActivity() {
|
||||||
private lateinit var navigator: Navigator
|
private lateinit var navigator: Navigator
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -142,6 +136,12 @@ class MainActivity : BaseActivity() {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not let the launcher create a new activity http://stackoverflow.com/questions/16283079
|
||||||
|
if (!isTaskRoot) {
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Draw edge-to-edge
|
// Draw edge-to-edge
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
|
|
||||||
|
|
|
@ -377,13 +377,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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the reader menu. It sets up click listeners and the initial visibility.
|
* Initializes the reader menu. It sets up click listeners and the initial visibility.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue