Esempio n. 1
0
        private void RefreshMembers()
        {
            Task.Run(async() =>
            {
                if (ListId == 0)
                {
                    var listDesc = await ListProxy.GetListDescription(_info).ConfigureAwait(false);
                    if (listDesc != null)
                    {
                        _listId = listDesc.Id;
                    }
                }
                // list data is not found
                if (ListId == 0)
                {
                    return;
                }

                var userIds = await ListProxy.GetListMembers(ListId).ConfigureAwait(false);
                // user data is not found
                if (userIds == null)
                {
                    return;
                }

                lock (Ids)
                {
                    Ids.Clear();
                    userIds.ForEach(id => Ids.Add(id));
                }
                OnListMemberUpdated.SafeInvoke();
            });
        }
Esempio n. 2
0
        private void OnListMemberChanged(Tuple <ListInfo, IEnumerable <long> > tuple)
        {
            var info = tuple.Item1;

            if (info.Equals(_info) && Ids.SyncSet(tuple.Item2))
            {
                OnListMemberUpdated?.Invoke();
            }
        }