public void RemoveChat(ChatModel chat) { lock (_SyncedChats) { _SyncedChats.Remove(chat); } f_TaskQueue.Queue(delegate { _UI.RemoveChat(chat); }); }
public void RemoveChat(ChatModel chat) { lock (_SyncedChats) { _SyncedChats.Remove(chat); } // switch to next protocol manager if the current one was closed if (chat is ProtocolChatModel && chat.ProtocolManager == CurrentProtocolManager) { NextProtocolManager(); } f_TaskQueue.Queue(delegate { _UI.RemoveChat(chat); }); }