mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Fix #361
This commit is contained in:
		| @@ -45,8 +45,9 @@ class CatalogueAdapter(val fragment: CatalogueFragment) : FlexibleAdapter<Catalo | ||||
|      * Clears the list of manga from the adapter. | ||||
|      */ | ||||
|     fun clear() { | ||||
|         val sizeBeforeRemoving = mItems.size | ||||
|         mItems.clear() | ||||
|         notifyDataSetChanged() | ||||
|         notifyItemRangeRemoved(0, sizeBeforeRemoving) | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -311,10 +311,6 @@ class CatalogueFragment : BaseRxFragment<CataloguePresenter>(), FlexibleViewHold | ||||
|      * @param mangas the list of manga of the page. | ||||
|      */ | ||||
|     fun onAddPage(page: Int, mangas: List<Manga>) { | ||||
|         // Avoid IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter... | ||||
|         catalogue_grid.stopScroll() | ||||
|         catalogue_list.stopScroll() | ||||
|  | ||||
|         hideProgressBar() | ||||
|         if (page == 0) { | ||||
|             adapter.clear() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user