Skip to content

Commit

Permalink
ignore notifications if no controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
tyhoff committed May 21, 2014
1 parent e1f8354 commit 96e6df4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SimonRemote/ApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ @implementation ApplicationDelegate {
Reachability* reach;
NSTimer *tickTimer;
NSString *channel;
int numConnections;
}

@synthesize panelController = _panelController;
Expand Down Expand Up @@ -59,6 +58,10 @@ -(void)reachabilityChanged:(NSNotification*)note

- (void)pushNewInfo:(NSNotification *)notification
{
if (_numberActiveControllers == 0) {
return;
}

if ([[notification name] isEqualToString:@"com.apple.iTunes.playerInfo"]) {
[[self messenger] sendNewInfoForApp:@"iTunes"];
} else if ([[notification name] isEqualToString:@"com.spotify.client.PlaybackStateChanged"]) {
Expand Down

0 comments on commit 96e6df4

Please sign in to comment.