Fix #361
Cette révision appartient à :
Parent
3e8ac6b2d0
révision
a32e0e4ec5
2 fichiers modifiés avec 2 ajouts et 5 suppressions
|
@ -45,8 +45,9 @@ class CatalogueAdapter(val fragment: CatalogueFragment) : FlexibleAdapter<Catalo
|
||||||
* Clears the list of manga from the adapter.
|
* Clears the list of manga from the adapter.
|
||||||
*/
|
*/
|
||||||
fun clear() {
|
fun clear() {
|
||||||
|
val sizeBeforeRemoving = mItems.size
|
||||||
mItems.clear()
|
mItems.clear()
|
||||||
notifyDataSetChanged()
|
notifyItemRangeRemoved(0, sizeBeforeRemoving)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -311,10 +311,6 @@ class CatalogueFragment : BaseRxFragment<CataloguePresenter>(), FlexibleViewHold
|
||||||
* @param mangas the list of manga of the page.
|
* @param mangas the list of manga of the page.
|
||||||
*/
|
*/
|
||||||
fun onAddPage(page: Int, mangas: List<Manga>) {
|
fun onAddPage(page: Int, mangas: List<Manga>) {
|
||||||
// Avoid IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter...
|
|
||||||
catalogue_grid.stopScroll()
|
|
||||||
catalogue_list.stopScroll()
|
|
||||||
|
|
||||||
hideProgressBar()
|
hideProgressBar()
|
||||||
if (page == 0) {
|
if (page == 0) {
|
||||||
adapter.clear()
|
adapter.clear()
|
||||||
|
|
Référencer dans un nouveau ticket