Notifies on sync complete for the UI
This commit is contained in:
parent
57206dde46
commit
af3050106f
2 changed files with 2 additions and 0 deletions
|
|
@ -183,6 +183,7 @@ def new_sync(client_observer: ClientObserver, connection_observer: ConnectionObs
|
||||||
if save_successful:
|
if save_successful:
|
||||||
notification = "Finshed sync."
|
notification = "Finshed sync."
|
||||||
Notifications.emit(EventType.STATUS_UPDATE, notification)
|
Notifications.emit(EventType.STATUS_UPDATE, notification)
|
||||||
|
Notifications.emit(EventType.SYNC_COMPLETE, notification)
|
||||||
return Result(valid=True, message=notification)
|
return Result(valid=True, message=notification)
|
||||||
else:
|
else:
|
||||||
error_msg = "Finshed sync, but had issues with the saving of metadata for next time."
|
error_msg = "Finshed sync, but had issues with the saving of metadata for next time."
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ class EventType(Enum):
|
||||||
STATUS_UPDATE = auto()
|
STATUS_UPDATE = auto()
|
||||||
SHOW_POPUP = auto()
|
SHOW_POPUP = auto()
|
||||||
RESUME_ACTIONS = auto()
|
RESUME_ACTIONS = auto()
|
||||||
|
SYNC_COMPLETE = auto()
|
||||||
|
|
||||||
class Notifications:
|
class Notifications:
|
||||||
_subscribers = {}
|
_subscribers = {}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue