public void Handle(TLUpdateUserBlocked updateUserBlocked) { var user = With as TLUserBase; if (user != null && user.Id.Value == updateUserBlocked.UserId.Value) { NotifyOfPropertyChange(() => With); } }
private void UpdateBlockedList(TLUserBase user, TLUpdateUserBlocked update) { if (update.Blocked.Value) { Items.Add(user); } else { Items.Remove(user); } Status = Items.Count > 0 || LazyItems.Count > 0 ? string.Empty : string.Format("{0}", AppResources.NoUsersHere); }
public void Handle(TLUpdateUserBlocked update) { var user = CacheService.GetUser(update.UserId); if (user != null) { UpdateBlockedList(user, update); } else { MTProtoService.GetFullUserAsync( new TLInputUserContact { UserId = update.UserId }, fullUser => UpdateBlockedList(fullUser.User, update)); } }