Exemple #1
0
        public void Postpone(string id, DateTime until)
        {
            _notificationsStorage.ChangePostponeDate(id, until);

            Add(NotificationUpdated.Create(id, NotificationUpdateType.Postponed));

            _postponedNotificationSender?.Set();
        }
Exemple #2
0
        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));
        }
Exemple #3
0
 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;
 }
Exemple #5
0
        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);
 }