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 2b3b477 commit 14ba503
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions App/BitBar/ExecutablePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ - (BOOL) refreshContentByExecutingCommand {
}

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

Expand All @@ -65,11 +71,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 14ba503

Please sign in to comment.