Ejemplo n.º 1
0
        Task InboxChanged(SubmitAccountButtonRow <MessageSubmitAccount> obj)
        {
            var submitAccount = obj.SubmitAccount;

            if (submitAccount == null)
            {
                return(Task.CompletedTask);
            }

            var info = obj.Tag as InboxNameRecordInfo;

            if (info == null)
            {
                return(Task.CompletedTask);
            }

            IsBusy = true;

            var index = MessageService.MessageServiceInfo.GetConversationIndex(submitAccount.AccountId, submitAccount.KeyIndex, submitAccount.FriendAccountId, submitAccount.FriendKeyIndex);
            var chat  = _node.GetChat(index, true);

            AddIndex       = GetRow("InboxInfo");
            AddIndexBefore = true;
            RemoveView(GetRow("SendMessage"));
            var b = AddButtonRow("SendMessage", SendMessage);

            b.SetDetailViewIcon(Icons.Pencil);
            b.Tag = chat;

            AddIndexBefore = false;

            IsBusy = false;
            return(Task.CompletedTask);
        }