Fix status bar bodge so stopping manually doesn't prevent playback for 3 seconds
parent
41d11bdfa8
commit
0a99093af0
|
@ -241,6 +241,9 @@
|
|||
int lastTrackPlaying = -1;
|
||||
double lastTrackPosition = 0;
|
||||
|
||||
if (currentStatus == kCogStatusStopping)
|
||||
currentStatus = kCogStatusStopped;
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setInteger:currentStatus forKey:@"lastPlaybackStatus"];
|
||||
|
||||
if (currentStatus != kCogStatusStopped)
|
||||
|
|
|
@ -73,7 +73,7 @@ NSString *CogPlaybackDidStopNotficiation = @"CogPlaybackDidStopNotficiation";
|
|||
|
||||
- (IBAction)playPauseResume:(id)sender
|
||||
{
|
||||
if (playbackStatus == kCogStatusStopped)
|
||||
if (playbackStatus == kCogStatusStopped || playbackStatus == kCogStatusStopping)
|
||||
{
|
||||
[self play:self];
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ NSDictionary * makeRGInfo(PlaylistEntry *pe)
|
|||
|
||||
- (void)playEntry:(PlaylistEntry *)pe startPaused:(BOOL)paused
|
||||
{
|
||||
if (playbackStatus != kCogStatusStopped)
|
||||
if (playbackStatus != kCogStatusStopped && playbackStatus != kCogStatusStopping)
|
||||
[self stop:self];
|
||||
|
||||
DLog(@"PLAYLIST CONTROLLER: %@", [playlistController class]);
|
||||
|
|
|
@ -389,7 +389,7 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
if (action == @selector(scrollToCurrentEntry:) && ([playbackController playbackStatus] == kCogStatusStopped))
|
||||
if (action == @selector(scrollToCurrentEntry:) && (([playbackController playbackStatus] == kCogStatusStopped) || ([playbackController playbackStatus] == kCogStatusStopping)))
|
||||
return NO;
|
||||
|
||||
return [super validateUserInterfaceItem:anItem];
|
||||
|
|
Loading…
Reference in New Issue