Skip to content

Commit

Permalink
Displaying "Updating..." only when manual refresh is triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean Caillé committed Jan 6, 2016
1 parent 5a58be1 commit 899bab6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions App/BitBar/ExecutablePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ - (BOOL) refreshContentByExecutingCommand {
}

-(void)performRefreshNow:(NSMenuItem*)menuItem{
self.content = @"Updating ...";
self.errorContent = @"";
[self rebuildMenuForStatusItem:self.statusItem];
[self refresh];
}

Expand All @@ -62,11 +65,7 @@ -(BOOL)refresh {
self.lineCycleTimer = nil;
[self.refreshTimer invalidate];
self.refreshTimer = nil;

self.content = @"Updating ...";
self.errorContent = @"";
[self rebuildMenuForStatusItem:self.statusItem];


// execute command
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{
[self refreshContentByExecutingCommand];
Expand Down

0 comments on commit 899bab6

Please sign in to comment.