Przeglądaj źródła

Fix crash if tapping title when opening reader directly

arkon 2 lat temu
rodzic
commit
2f2f59279d

+ 6 - 6
app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt

@@ -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)
 

+ 0 - 7
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

@@ -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.
      */