X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/c5e27c027b47fbe861953d0c9334c5780a7cf69b..2404965b693451fd71dcffd06eb82695e9085389:/MainController.m diff --git a/MainController.m b/MainController.m index 065659a..67ce65d 100755 --- a/MainController.m +++ b/MainController.m @@ -14,7 +14,6 @@ - (ITMTRemote *)loadRemote; - (void)timerUpdate; - (void)setLatestSongIdentifier:(NSString *)newIdentifier; -- (void)showCurrentTrackInfo; - (void)applicationLaunched:(NSNotification *)note; - (void)applicationTerminated:(NSNotification *)note; @end @@ -960,6 +959,12 @@ static MainController *sharedController; if (result == 1) { [[PreferencesController sharedPrefs] resetRemotePlayerTextFields]; currentRemote = [[[networkController networkObject] remote] retain]; + [refreshTimer invalidate]; + refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:([networkController isConnectedToServer] ? 10.0 : 0.5) + target:self + selector:@selector(timerUpdate) + userInfo:nil + repeats:YES] retain]; [self timerUpdate]; ITDebugLog(@"Connection successful."); return 1;