fix: cleaning tray icon update state after updating

This commit is contained in:
Vinicius Moreira
2019-07-24 16:36:38 -03:00
parent 0d541756b7
commit 96e1cabb40
2 changed files with 6 additions and 1 deletions

View File

@@ -27,7 +27,6 @@ class UpdateCheck(QThread):
def run(self):
while True:
updates = self.manager.list_updates()
self.signal.emit(updates)
time.sleep(self.check_interval)
@@ -81,6 +80,9 @@ class TrayIcon(QSystemTrayIcon):
if reason == self.Trigger:
self.show_manage_window()
def verify_updates(self):
self.notify_updates(self.manager.list_updates())
def notify_updates(self, updates: List[ApplicationUpdate]):
self.lock_notify.acquire()

View File

@@ -499,6 +499,9 @@ class ManageWindow(QWidget):
system.notify_user('{} {}'.format(updated, self.locale_keys['notification.update_selected.success']))
self.refresh_apps()
if self.tray_icon:
self.tray_icon.verify_updates()
else:
if self._can_notify_user():
system.notify_user(self.locale_keys['notification.update_selected.failed'])