mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix crash if tapping title when opening reader directly
This commit is contained in:
		@@ -114,12 +114,6 @@ class MainActivity : BaseActivity() {
 | 
			
		||||
    private lateinit var navigator: Navigator
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
@@ -142,6 +136,12 @@ class MainActivity : BaseActivity() {
 | 
			
		||||
            false
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Do not let the launcher create a new activity http://stackoverflow.com/questions/16283079
 | 
			
		||||
        if (!isTaskRoot) {
 | 
			
		||||
            finish()
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Draw edge-to-edge
 | 
			
		||||
        WindowCompat.setDecorFitsSystemWindows(window, false)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -377,13 +377,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)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Initializes the reader menu. It sets up click listeners and the initial visibility.
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user