From b8ffb87f01ddda5e09e97170aa5d3287743d6d70 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 16 May 2020 12:15:04 -0400 Subject: [PATCH] Add fastscroller to migration lists --- .../ui/migration/MigrationController.kt | 12 +++++----- .../main/res/layout/migration_controller.xml | 22 ++++++++++++++++--- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt index 03ddd90fa..85cf3ebe2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt @@ -38,9 +38,9 @@ class MigrationController : super.onViewCreated(view) adapter = FlexibleAdapter(null, this) - binding.migrationRecycler.layoutManager = LinearLayoutManager(view.context) - binding.migrationRecycler.adapter = adapter - binding.migrationRecycler.addItemDecoration(SourceDividerItemDecoration(view.context)) + binding.recycler.layoutManager = LinearLayoutManager(view.context) + binding.recycler.adapter = adapter + binding.recycler.addItemDecoration(SourceDividerItemDecoration(view.context)) } override fun onDestroyView(view: View) { @@ -66,14 +66,16 @@ class MigrationController : title = resources?.getString(R.string.label_migration) if (adapter !is SourceAdapter) { adapter = SourceAdapter(this) - binding.migrationRecycler.adapter = adapter + binding.recycler.adapter = adapter + adapter?.fastScroller = binding.fastScroller } adapter?.updateDataSet(state.sourcesWithManga) } else { title = state.selectedSource.toString() if (adapter !is MangaAdapter) { adapter = MangaAdapter(this) - binding.migrationRecycler.adapter = adapter + binding.recycler.adapter = adapter + adapter?.fastScroller = binding.fastScroller } adapter?.updateDataSet(state.mangaForSource) } diff --git a/app/src/main/res/layout/migration_controller.xml b/app/src/main/res/layout/migration_controller.xml index b15853c29..ecaec0309 100644 --- a/app/src/main/res/layout/migration_controller.xml +++ b/app/src/main/res/layout/migration_controller.xml @@ -1,5 +1,21 @@ - + android:layout_height="wrap_content"> + + + + + +