Пример #1
0
        public void Handle(UpdateChatReadInbox update)
        {
            if (update.UnreadCount == 0)
            {
                var chat = _cacheService.GetChat(update.ChatId);
                if (chat == null)
                {
                    return;
                }

                ToastNotificationManager.History.RemoveGroup(GetGroup(chat), "App");
            }
        }
Пример #2
0
        public async void Handle(UpdateChatReadInbox update)
        {
            if (update.UnreadCount == 0)
            {
                var chat = _cacheService.GetChat(update.ChatId);
                if (chat == null)
                {
                    return;
                }

                try
                {
                    // Notifications APIs like to crash
                    var collectionHistory = await GetCollectionHistoryAsync();

                    collectionHistory.RemoveGroup(GetGroup(chat));
                }
                catch { }
            }
        }