Пример #1
0
 private EventHandler getChatSnoozeItemClickEvent(ChatState chatState)
 {
     return(delegate
     {
         ShowHideSnoozeMenuItems(snoozeVisible: false);
         _stateService.Snooze(chatState.name);
     });
 }
        private void SnoozeChat(SlackState lastSlackState, string chatName)
        {
            var snoozedChatState = new ChatState {
                name = chatName
            };
            var originalChatState = lastSlackState.ReplaceChatState(snoozedChatState);

            _snoozedChats[chatName] = originalChatState;
        }
Пример #3
0
        private void SnoozeChat(SlackState lastSlackState, string chatName)
        {
            var snoozedChatState = new ChatState {
                Id = chatName, Unread = false, Mention = false
            };
            var originalChatState = lastSlackState.ReplaceChatState(snoozedChatState);

            _snoozedChannelStates[chatName] = originalChatState;
        }
        public ChatState ReplaceChatState(ChatState replacementChatState)
        {
            var originalChatState = ChatStates.FirstOrDefault(chatState => chatState.Id == replacementChatState.Id);
            if (originalChatState != null)
            {
                _chatStates.Remove(originalChatState);
                _chatStates.Add(replacementChatState);
            }

            CalculateTrayState();

            return originalChatState;
        }
        public ChatState ReplaceChatState(ChatState replacementChatState)
        {
            var originalChatState = ChatStates.FirstOrDefault(chatState => chatState.Id == replacementChatState.Id);

            if (originalChatState != null)
            {
                _chatStates.Remove(originalChatState);
                _chatStates.Add(replacementChatState);
            }

            CalculateTrayState();

            return(originalChatState);
        }
 private void SnoozeChat(SlackState lastSlackState, string chatName)
 {
     var snoozedChatState = new ChatState {Id = chatName, Unread = false, Mention = false};
     var originalChatState = lastSlackState.ReplaceChatState(snoozedChatState);
     _snoozedChannelStates[chatName] = originalChatState;
 }