mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Add fastscroller to migration lists
(cherry picked from commit b8ffb87f01)
# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/migration/MigrationController.kt
			
			
This commit is contained in:
		| @@ -58,10 +58,10 @@ class MigrationController : | ||||
|         view.applyWindowInsetsForController() | ||||
|  | ||||
|         adapter = FlexibleAdapter(null, this) | ||||
|         binding.migrationRecycler.layoutManager = | ||||
|         binding.recycler.layoutManager = | ||||
|             androidx.recyclerview.widget.LinearLayoutManager(view.context) | ||||
|         binding.migrationRecycler.adapter = adapter | ||||
|         binding.migrationRecycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener) | ||||
|         binding.recycler.adapter = adapter | ||||
|         binding.recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener) | ||||
|     } | ||||
|  | ||||
|     override fun onDestroyView(view: View) { | ||||
| @@ -87,7 +87,8 @@ class MigrationController : | ||||
|             title = resources?.getString(R.string.source_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 { | ||||
| @@ -95,7 +96,8 @@ class MigrationController : | ||||
|             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, true) | ||||
|             /*if (switching) launchUI { | ||||
|   | ||||
| @@ -1,5 +1,21 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:id="@+id/migration_recycler" | ||||
| <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:app="http://schemas.android.com/apk/res-auto" | ||||
|     xmlns:tools="http://schemas.android.com/tools" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent" /> | ||||
|     android:layout_height="wrap_content"> | ||||
|  | ||||
|     <androidx.recyclerview.widget.RecyclerView | ||||
|         android:id="@+id/recycler" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" /> | ||||
|  | ||||
|     <eu.kanade.tachiyomi.ui.library.MaterialFastScroll | ||||
|         android:id="@+id/fast_scroller" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="match_parent" | ||||
|         android:layout_gravity="end" | ||||
|         app:fastScrollerBubbleEnabled="false" | ||||
|         tools:visibility="visible" /> | ||||
|  | ||||
| </FrameLayout> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user