瀏覽代碼

Add check for backstack size before pushing DownloadController (#5312)

Hunter Nickel 3 年之前
父節點
當前提交
64f95af3e5
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt

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

@@ -172,7 +172,9 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
                         controller?.showSettingsSheet()
                     }
                     R.id.nav_updates -> {
-                        router.pushController(DownloadController().withFadeTransaction())
+                        if (router.backstackSize == 1) {
+                            router.pushController(DownloadController().withFadeTransaction())
+                        }
                     }
                 }
             }