fix(@communities): Handle Activity center event

fixes #4408
This commit is contained in:
Anthony Laibe 2022-01-27 10:54:36 +01:00 committed by Sale Djenic
parent 25ac0fbb68
commit 76331cee11
1 changed files with 9 additions and 0 deletions

View File

@ -79,6 +79,15 @@ QtObject:
proc init*(self: Service) = proc init*(self: Service) =
self.asyncActivityNotificationLoad() self.asyncActivityNotificationLoad()
self.events.on(SignalType.Message.event) do(e: Args):
var receivedData = MessageSignal(e)
# Handling activityCenterNotifications updates
if (receivedData.activityCenterNotifications.len > 0):
self.events.emit(
SIGNAL_ACTIVITY_CENTER_NOTIFICATIONS_LOADED,
ActivityCenterNotificationsArgs(activityCenterNotifications: receivedData.activityCenterNotifications)
)
proc hasMoreToShow*(self: Service): bool = proc hasMoreToShow*(self: Service): bool =
return self.cursor != "" return self.cursor != ""