コード例 #1
0
        async Task InboxChanged(InboxNameRecordInfo info)
        {
            var keyIndex = info.KeyIndex;
            var friend   = _node.GetFriend(_friendAccountId);

            if (friend == null)
            {
                await ErrorAsync("NotFriends");

                return;
            }

            var success = _node.GenerateSubmitAccounts(_friendAccountId, keyIndex);

            RemoveHeaderSection("Inbox");
            AddIndex = GetRow("SelectInboxFooter");
            AddIndex = AddHeaderRow("Inbox");

            var row = AddRow(new SubmitAccountButtonRow <MessageSubmitAccount>(this, () => _node.ServiceNode.GetSubmitAccounts <MessageSubmitAccount>((su) => su.FriendAccountId == _friendAccountId && su.FriendKeyIndex == keyIndex), $"friend-{_friendAccountId}-{keyIndex}"));

            AddIndex = row;

            row.SelectionChanged = InboxChanged;
            row.Tag = info;

            AddIndex = AddInfoRow("InboxInfo");

            AddFooterRow();

            await InboxChanged(row);
        }