Restore call to notifyDatasetChanged() on long press

This commit is contained in:
Naveen 2023-07-26 00:11:35 +05:30
parent 34bea9f7f6
commit 8c85eae120
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3

View file

@ -114,9 +114,17 @@ class TracksAdapter(
override fun getItemKeyPosition(key: Int) = tracks.indexOfFirst { it.hashCode() == key }
override fun onActionModeCreated() {}
override fun onActionModeCreated() {
if (isPlaylistContent) {
notifyItemRangeChanged(0, itemCount)
}
}
override fun onActionModeDestroyed() {}
override fun onActionModeDestroyed() {
if (isPlaylistContent) {
notifyItemRangeChanged(0, itemCount)
}
}
private fun addToPlaylist() {
activity.addTracksToPlaylist(getSelectedTracks()) {