public void Handle(TLUpdateUserBlocked updateUserBlocked)
        {
            var user = With as TLUserBase;

            if (user != null && user.Id.Value == updateUserBlocked.UserId.Value)
            {
                NotifyOfPropertyChange(() => With);
            }
        }
示例#2
0
 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);
 }
示例#3
0
        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));
            }
        }