mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 23:24:15 +02:00
fix: downgrade notification when the window is not visible
This commit is contained in:
@@ -139,9 +139,9 @@ class DowngradeApp(AsyncAction):
|
|||||||
success = False
|
success = False
|
||||||
self.print(self.locale_keys['internet.required'])
|
self.print(self.locale_keys['internet.required'])
|
||||||
finally:
|
finally:
|
||||||
|
self.notify_finished({'app': self.app, 'success': success})
|
||||||
self.app = None
|
self.app = None
|
||||||
self.root_password = None
|
self.root_password = None
|
||||||
self.notify_finished(success)
|
|
||||||
|
|
||||||
|
|
||||||
class GetAppInfo(AsyncAction):
|
class GetAppInfo(AsyncAction):
|
||||||
|
|||||||
@@ -368,13 +368,12 @@ class ManageWindow(QWidget):
|
|||||||
def _can_notify_user(self):
|
def _can_notify_user(self):
|
||||||
return self.isHidden() or self.isMinimized()
|
return self.isHidden() or self.isMinimized()
|
||||||
|
|
||||||
def _finish_downgrade(self, success: bool):
|
def _finish_downgrade(self, res: dict):
|
||||||
self.finish_action()
|
self.finish_action()
|
||||||
|
|
||||||
if success:
|
if res['success']:
|
||||||
if self._can_notify_user():
|
if self._can_notify_user():
|
||||||
app = self.table_apps.get_selected_app()
|
util.notify_user('{} {}'.format(res['app'], self.locale_keys['downgraded']))
|
||||||
util.notify_user('{} ({}) {}'.format(app.model.base_data.name, app.model.get_type(), self.locale_keys['downgraded']))
|
|
||||||
|
|
||||||
self.refresh_apps()
|
self.refresh_apps()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user