private async void INSTANCE_MUCInfoChanged(MUCDBManager handler, MUCInfoChangedEventArgs args) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { if (Chat != null && Chat.id.Equals(args.MUC_INFO.chatId)) { MUCInfo = args.MUC_INFO; } }); }
private async void INSTANCE_MUCInfoChanged(MUCDBManager handler, MUCInfoChangedEventArgs args) { if (!(args.MUC_INFO is null) && string.Equals(args.MUC_INFO.chatId, chatId)) { await SharedUtils.CallDispatcherAsync(() => { // Force update property: MucInfo = null; MucInfo = args.MUC_INFO; }).ConfAwaitFalse(); } }
private async void INSTANCE_MUCMemberChanged(MUCDBManager handler, Data_Manager2.Classes.Events.MUCOccupantChangedEventArgs args) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (Chat == null || !Equals(args.MUC_OCCUPANT.chatId, Chat.id)) { return; } // Update kick ban button IsEnabled: if (MUCInfo != null && Equals(args.MUC_OCCUPANT.nickname, MUCInfo.nickname)) { setCanKickBan(); setIfKickBanButtonEnabled(); } // Add occupant to collection: for (int i = 0; i < occupants.Count; i++) { if (Equals(occupants[i].occupant.id, args.MUC_OCCUPANT.id)) { if (args.REMOVED) { occupants.RemoveAt(i); } else { occupants[i] = new MUCOccupantTemplate() { occupant = args.MUC_OCCUPANT }; } return; } } occupants.Add(new MUCOccupantTemplate() { occupant = args.MUC_OCCUPANT }); }); }
private void INSTANCE_MUCInfoChanged(MUCDBManager handler, Data_Manager2.Classes.Events.MUCInfoChangedEventArgs args) { CHATS.UpdateMUCInfo(args.MUC_INFO); }
private void INSTANCE_MUCInfoChanged(MUCDBManager handler, MUCInfoChangedEventArgs args) { Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => CHATS.UpdateMUCInfo(args.MUC_INFO)).AsTask(); }