adam-codersgu / supernova

A Kotlin-based Android application that allows the user to play music from their device while custom animations fall over the album artwork of the currently playing song.
0 stars 0 forks source link

Bizarre behaviour in Album view when songs from that album are deleted #8

Closed adam-codersgu closed 1 year ago

adam-codersgu commented 1 year ago

When Album view is open, and an audio file for a song in that album is deleted from the device, the RecyclerView does not refresh accordingly. It removes multiple songs instead of just one. The RecyclerView is correct when the Album view is exited and returned to; however, it would be preferable to handle the initial deletion event correctly also

May also need to check if other views e.g. artist view are affected

adam-codersgu commented 1 year ago

Working on branch bug/recyclerview_item_removal

adam-codersgu commented 1 year ago

Partially rectified; however, still need to investigate why the metadata for the last song in the play queue is displayed but does not play when clicked following the removal of earlier songs in the album.

Also, I'm wondering if whether a removal animation might look better than notifyItemChanged. If this option is taken forward though would need to check it is correct. For example, no chance that songs could be labelled with incorrect metadata? e.g. if no songs are actually removed but instead their data is changed. I don't think this is possible because if metadata is changed then by definition the fragment must have first been navigated from and subsequently returned to, which would have triggered a fresh data load.

adam-codersgu commented 1 year ago

Resolved and merged https://github.com/adam-codersgu/supernova/pull/34/