From aa6f1a0de5516bff5a7ad4732092033cbd4f4d31 Mon Sep 17 00:00:00 2001 From: Jobobby04 Date: Thu, 6 Aug 2020 21:09:25 -0400 Subject: [PATCH] Cleanup --- .../java/eu/kanade/tachiyomi/ui/manga/MangaController.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index 69e7fdc3f..2cb3b655e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -142,9 +142,11 @@ class MangaController : private val toolbarTextColor by lazy { view!!.context.getResourceColor(R.attr.colorOnPrimary) } private var mangaInfoAdapter: MangaInfoHeaderAdapter? = null + // SY >-- private var mangaInfoItemAdapter: MangaInfoItemAdapter? = null private var mangaInfoButtonsAdapter: MangaInfoButtonsAdapter? = null private var mangaMetaInfoAdapter: RecyclerView.Adapter<*>? = null + // SY <-- private var chaptersHeaderAdapter: MangaChaptersHeaderAdapter? = null private var chaptersAdapter: ChaptersAdapter? = null @@ -225,6 +227,7 @@ class MangaController : val adapters: MutableList?> = mutableListOf() // Init RecyclerView and adapter + // SY --> mangaInfoAdapter = MangaInfoHeaderAdapter(this) adapters += mangaInfoAdapter @@ -253,6 +256,7 @@ class MangaController : binding.recycler.adapter = ConcatAdapter(adapters) binding.recycler.layoutManager = LinearLayoutManager(view.context) binding.recycler.addItemDecoration(ChapterDividerItemDecoration(view.context, if ((!preferences.recommendsInOverflow().get() || smartSearchConfig != null) && thisSourceAsLewdSource != null) 4 else if (!preferences.recommendsInOverflow().get() || smartSearchConfig != null || thisSourceAsLewdSource != null) 3 else 2)) + // SY <-- binding.recycler.setHasFixedSize(true) chaptersAdapter?.fastScroller = binding.fastScroller @@ -364,6 +368,11 @@ class MangaController : chaptersHeaderAdapter = null chaptersAdapter = null settingsSheet = null + // SY --> + mangaInfoButtonsAdapter = null + mangaInfoItemAdapter = null + mangaMetaInfoAdapter = null + // SY <-- updateToolbarTitleAlpha(255) super.onDestroyView(view) }