浏览代码

Fix inverted if condition

len 8 年之前
父节点
当前提交
be521804c8
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryFragment.kt

+ 4 - 4
app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryFragment.kt

@@ -82,13 +82,13 @@ class LibraryCategoryFragment : BaseFragment(), FlexibleViewHolder.OnListItemCli
         adapter = LibraryCategoryAdapter(this)
 
         val recycler = if (preferences.libraryAsList().getOrDefault()) {
-            (swipe_refresh.inflate(R.layout.library_grid_recycler) as AutofitRecyclerView).apply {
-                spanCount = libraryFragment.mangaPerRow
-            }
-        } else {
             (swipe_refresh.inflate(R.layout.library_list_recycler) as RecyclerView).apply {
                 layoutManager = LinearLayoutManager(context)
             }
+        } else {
+            (swipe_refresh.inflate(R.layout.library_grid_recycler) as AutofitRecyclerView).apply {
+                spanCount = libraryFragment.mangaPerRow
+            }
         }
 
         (recycler.layoutManager as LinearLayoutManager).recycleChildrenOnDetach = true