mirror of
https://github.com/transmission/transmission
synced 2024-12-21 23:32:35 +00:00
feat: clear the badge when quitting app (#7088)
This commit is contained in:
parent
4e25c038a6
commit
9513cdaebb
1 changed files with 6 additions and 2 deletions
|
@ -1068,7 +1068,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
|
|||
//remove all torrent downloads
|
||||
[self.fSession invalidateAndCancel];
|
||||
|
||||
//remember window states and close all windows
|
||||
//remember window states
|
||||
[self.fDefaults setBool:self.fInfoController.window.visible forKey:@"InfoVisible"];
|
||||
|
||||
if ([QLPreviewPanel sharedPreviewPanelExists] && [QLPreviewPanel sharedPreviewPanel].visible)
|
||||
|
@ -1076,18 +1076,22 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
|
|||
[[QLPreviewPanel sharedPreviewPanel] updateController];
|
||||
}
|
||||
|
||||
// close all windows
|
||||
for (NSWindow* window in NSApp.windows)
|
||||
{
|
||||
[window close];
|
||||
}
|
||||
|
||||
// clear the badge
|
||||
[self.fBadger updateBadgeWithDownload:0 upload:0];
|
||||
|
||||
//save history
|
||||
[self updateTorrentHistory];
|
||||
[self.fTableView saveCollapsedGroups];
|
||||
|
||||
_fileWatcherQueue = nil;
|
||||
|
||||
//complete cleanup
|
||||
//complete cleanup: this can take many seconds
|
||||
tr_sessionClose(self.fLib);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue