Add a bodge so playback status bar doesn't pop in and out repeatedly on manual track changes
parent
002fa3b63e
commit
97fee7e486
|
@ -590,6 +590,14 @@ NSDictionary * makeRGInfo(PlaylistEntry *pe)
|
|||
DLog(@"PLAYING!");
|
||||
[self setSeekable:YES];
|
||||
}
|
||||
|
||||
if (status == kCogStatusStopped) {
|
||||
status = kCogStatusStopping;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
if ([self playbackStatus] == kCogStatusStopping)
|
||||
[self setPlaybackStatus:kCogStatusStopped];
|
||||
});
|
||||
}
|
||||
|
||||
[self setPlaybackStatus:status];
|
||||
}
|
||||
|
|
|
@ -12,4 +12,5 @@ enum
|
|||
kCogStatusStopped = 0,
|
||||
kCogStatusPaused,
|
||||
kCogStatusPlaying,
|
||||
kCogStatusStopping,
|
||||
};
|
||||
|
|
|
@ -21,7 +21,8 @@ class PlaybackStatusToHiddenTransformer : ValueTransformer {
|
|||
case kCogStatusStopped as Int:
|
||||
return true
|
||||
case kCogStatusPaused as Int,
|
||||
kCogStatusPlaying as Int:
|
||||
kCogStatusPlaying as Int,
|
||||
kCogStatusStopping as Int:
|
||||
return false
|
||||
case .none:
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue