Conversation
a9d35e2 to
530151e
Compare
There was a problem hiding this comment.
as I understand, it should be merged after #1442
you may also want to fix typo in the last commit message: dine
Yes.
Where do you see this? |
|
530151e to
d5ce8da
Compare
Oh my, was looking at the wrong branch. Fixed this, but let's wait until #1442 has been merged. |
|
@kambala-decapitator, the build issue seems to be a problem with the CI job? |
8190d6d to
0404571
Compare
|
please fix conflicts |
…sert This avoids mismatching playlist in Kodi and remote app after attempting to move the playing item from the app.
The playlist is already empty, so there is no need to animate / delete / reload / notify anything again. It was already done.
0404571 to
427d5fe
Compare
|
Squashed and rebased to master. |
Description
This PR was motivated by reviewing the implementation of editing
UITableView. The review showed four main findings:Unneeded calls of
reloadDataandselectRowAtIndexPathCalls of
reloadDataandselectRowAtIndexPathare not required insidecommitEditingStyleandmoveRowAtIndexPath:ToIndexPath. They got removed.Handling removal last playlist
It was also found that after deleting the last playlist item the info label "No items found." was not shown, and that the edit button was still shown active and selected. This is now corrected.
Improper error handling in moveRowAtIndexPath:ToIndexPath
In case an error was reported for
Playlist.Remove(e.g. when attempting to move the current playing item) the playlist was not properly reloaded. This resulted in inconsistency between the real playlist in Kodi and the one displayed by the remote app. Also, the wrong item was shown as playing. The correct solution is to callcreatePlaylistAnimatedwhich will reload the playlist from Kodi and update theUITableView. In case of a (theoretical) issue withPlaylist.Insertthe same error handling is applied.Repeated action to remove playlist on server disconnect
In case of server being disconnected a set of actions (fade out
playlistTableView, deleteplaylistData,reloadData, send notification for iPad that playlist is empty) was called repeated, even thoughplaylistDatais already empty. An early return is added toserverIsDisconnectedto avoid this.Important: Needs minor rebasing once #1441 and #1442 were merged.
Summary for release notes
Bugfix: Fixes wrong playlist state when facing an error during moving an item in the playlist
Improvement: Shows "No items found." in the playlist once all items were removed by user