Skip to content

Commit a9d35e2

Browse files
committed
Avoid processing the animation block, if the playlist is already empty
The playlist is already empty, so there is no need to animate / delete / reload / notify anything again. It was already dine.
1 parent 6532b7d commit a9d35e2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

XBMC Remote/NowPlaying.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ - (void)setCoverSize:(NSString*)type {
357357
- (void)serverIsDisconnected {
358358
currentPlaylistID = PLAYERID_UNKNOWN;
359359
storedItemID = 0;
360+
[self nothingIsPlaying];
361+
if (playlistData.count == 0) {
362+
return;
363+
}
360364
[UIView animateWithDuration:0.1
361365
delay:0.0
362366
options:UIViewAnimationOptionCurveEaseInOut
@@ -369,7 +373,6 @@ - (void)serverIsDisconnected {
369373
[playlistTableView reloadData];
370374
[self notifyChangeForPlaylistHeader];
371375
}];
372-
[self nothingIsPlaying];
373376
}
374377

375378
- (void)nothingIsPlaying {

0 commit comments

Comments
 (0)