If you have an issue with any of our projects. feel free to register.

Commit 0a99093a authored by Christopher Snowhill's avatar Christopher Snowhill

Fix status bar bodge so stopping manually doesn't prevent playback for 3 seconds

parent 41d11bdf
......@@ -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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment