コード例 #1
0
        private void UpdateAndRemoveAt(int i, TLMessage message, TLMessage updatedMessage)
        {
            message.Update(updatedMessage);

            var messageMediaGeoLive = message.Media as TLMessageMediaGeoLive;

            if (messageMediaGeoLive != null && !messageMediaGeoLive.Active)
            {
                _messages.RemoveAt(i);

                TLUtils.SaveObjectToMTProtoFile(_liveLocationsSyncRoot, Constants.LiveLocationsFileName, _messages);

                SetNextTimer();

                _eventAggregator.Publish(new LiveLocationRemovedEventArgs {
                    Messages = new List <TLMessage> {
                        message
                    }
                });
            }
        }