public void Handle(TLUpdateEditChannelMessage update) { var channel = With as TLChannel; if (channel == null) { return; } var message = update.Message as TLMessage; if (message == null || !(message.ToId is TLPeerChannel)) { return; } if (channel.Id == message.ToId.Id) { BeginOnUIThread(() => { var already = Items.FirstOrDefault(x => x.Id == update.Message.Id) as TLMessage; if (already == null) { return; } //if (already != message) { already.Edit(message); } message = already; message.RaisePropertyChanged(() => message.HasEditDate); message.RaisePropertyChanged(() => message.Message); message.RaisePropertyChanged(() => message.Media); message.RaisePropertyChanged(() => message.ReplyMarkup); message.RaisePropertyChanged(() => message.Self); message.RaisePropertyChanged(() => message.SelfBase); }); } }
public void Handle(TLUpdateEditChannelMessage update) { var message = update.Message as TLMessage; if (message == null) { return; } Execute.BeginOnUIThread(() => { for (int i = 0; i < Count; i++) { if (this[i].Peer.Id == message.ToId.Id && this[i].TopMessage == message.Id) { this[i].RaisePropertyChanged(() => this[i].Self); } } }); }
public void Handle(TLUpdateEditChannelMessage update) { var updatedMessage = update.Message as TLMessage; if (updatedMessage != null) { lock (_liveLocationsSyncRoot) { if (_messages == null) { Load(); } if (_messages == null) { return; } for (var i = 0; i < _messages.Count; i++) { var message = _messages[i] as TLMessage; if (message != null && message.Index == updatedMessage.Index) { var peer = updatedMessage.ToId; if (peer is TLPeerChannel && message.ToId is TLPeerChannel && peer.Id.Value == message.ToId.Id.Value) { UpdateAndRemoveAt(i, message, updatedMessage); return; } } } } } }