Skip to content

Issue when remove Loading would remove a list item #14

@bhapps

Description

@bhapps

I had issue when remove Loading would remove a list item at index 0, my fix was to check for item type is indeed LOADING holder by checking in the if statement in the removeLoadingFooter() function using

&& getItemViewType(position) == LOADING

sorry code is in Kotlin as I am using Kotlin ..

fun removeLoadingFooter() {
        isLoadingAdded = false
        val position = loadingFooterLastPosition
        val result = getItem(position)
        if (result != null && getItemViewType(position) == LOADING) {
            CamerasModel!!.removeAt(position)
            notifyItemRemoved(position)
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions