Skip to content

Commit 96e6df4

Browse files
committed
ignore notifications if no controllers
1 parent e1f8354 commit 96e6df4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

SimonRemote/ApplicationDelegate.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ @implementation ApplicationDelegate {
88
Reachability* reach;
99
NSTimer *tickTimer;
1010
NSString *channel;
11-
int numConnections;
1211
}
1312

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

6059
- (void)pushNewInfo:(NSNotification *)notification
6160
{
61+
if (_numberActiveControllers == 0) {
62+
return;
63+
}
64+
6265
if ([[notification name] isEqualToString:@"com.apple.iTunes.playerInfo"]) {
6366
[[self messenger] sendNewInfoForApp:@"iTunes"];
6467
} else if ([[notification name] isEqualToString:@"com.spotify.client.PlaybackStateChanged"]) {

0 commit comments

Comments
 (0)