コード例 #1
0
        protected override async Task DoReceive()
        {
            if (_listId == null)
            {
                // get description
                var list = (await ReceiveListDescription(_auth, _listInfo));
                await ListProxy.SetListDescription(list);

                _listId = list.Id;
            }
            // if list data is not found, abort receiving timeline.
            if (_listId == null)
            {
                return;
            }
            var id       = _listId.Value;
            var users    = (await ReceiveListMembers(_auth, id)).OrderBy(l => l).ToArray();
            var oldUsers = (await ListProxy.GetListMembers(id)).OrderBy(l => l).ToArray();

            if (users.SequenceEqual(oldUsers))
            {
                // not changed
                return;
            }
            // commit changes
            await ListProxy.SetListMembers(id, users);

            ListMemberChanged.SafeInvoke();
        }