public async void RemoveRetweetedUser(long userId) { if (Status.RetweetedStatus != null) { var status = await Get(Status.RetweetedStatus).ConfigureAwait(false); status.RemoveRetweetedUser(userId); } else { TwitterUser remove; lock (_retweetedsLock) { if (_retweetedUsersDic.TryGetValue(userId, out remove)) { _retweetedUsersDic.Remove(userId); Status.RetweetedUsers = Status.RetweetedUsers.Guard().Except(new[] { userId }).ToArray(); } } if (remove != null) { _retweetedUsers.Remove(remove); // update persistent info #pragma warning disable 4014 StatusProxy.RemoveRetweeter(Status.Id, userId); StatusBroadcaster.Republish(this); #pragma warning restore 4014 } } }
public void RemoveAccountFromId(long id) { var acc = this.Get(id); if (acc != null) { _accountObservableCollection.Remove(acc); } }
public static void RemoveEvent(BackstageEventBase ev) { var tev = ev as TwitterEventBase; if (tev == null) { return; } lock (_twitterEvents.SyncRoot) { _twitterEvents.Remove(tev); } }