Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
Attempt to load the UI when a new track starts.
Browse files Browse the repository at this point in the history
Sometimes it doesn't load on initial auth, e.g.
when there is a modal message and the main window
isn't loaded.
  • Loading branch information
georgebrock committed Dec 14, 2010
1 parent c45111c commit 60411dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions LastifyController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ - (void)initLastfmConnection


- (void)loadUserInterface - (void)loadUserInterface
{ {
if(drawer != nil || [[SPController sharedController] mainWindow] == nil)
return;

[NSBundle loadNibNamed:@"LastifyInterface" owner:self]; [NSBundle loadNibNamed:@"LastifyInterface" owner:self];


[statusImage setImage:nil]; [statusImage setImage:nil];
Expand Down Expand Up @@ -218,6 +221,7 @@ - (IBAction)taggingOK:(id)sender
- (void)startNewTrack:(NSString*)trackName byArtist:(NSString*)artistName - (void)startNewTrack:(NSString*)trackName byArtist:(NSString*)artistName
{ {
NSLog(@"LASTIFY track started: \"%@\" by %@", trackName, artistName); NSLog(@"LASTIFY track started: \"%@\" by %@", trackName, artistName);
[self loadUserInterface];
self.currentTrack = trackName; self.currentTrack = trackName;
self.currentArtist = artistName; self.currentArtist = artistName;
} }
Expand Down

0 comments on commit 60411dc

Please sign in to comment.