public void Postpone(string id, DateTime until) { _notificationsStorage.ChangePostponeDate(id, until); Add(NotificationUpdated.Create(id, NotificationUpdateType.Postponed)); _postponedNotificationSender?.Set(); }
public void Dismiss(string id) { _notificationsStorage.Delete(id); // send this notificaton even when notification doesn't exist // we don't persist all notifications Add(NotificationUpdated.Create(id, NotificationUpdateType.Dismissed)); }
private void OnNotificationUpdated(int position) { NotificationUpdated?.Invoke(this, new NotificationItemClickedEventArgs { Position = position } ); }
public void SetActive() { RequestManager.SetActiveRoom(Name); active = true; Notifications = 0; NotificationUpdated?.Invoke(Notifications); MessageReceived -= AddNotification; }
public void Dismiss(string id, RavenTransaction existingTransaction = null, bool sendNotificationEvenIfDoesntExist = true) { var deleted = _notificationsStorage.Delete(id, existingTransaction); if (deleted == false && sendNotificationEvenIfDoesntExist == false) { return; } // send this notification even when notification doesn't exist // we don't persist all notifications Add(NotificationUpdated.Create(id, NotificationUpdateType.Dismissed)); }
internal void AddNotification(ChatMessage s) { Notifications++; NotificationUpdated?.Invoke(Notifications); }