Beispiel #1
0
        /// <summary>
        /// 加载信息
        /// </summary>
        async void LoadMsg()
        {
            if (OtherID < 0)
            {
                return;
            }

            string sql = $"select * from ChatMember where id={OtherID}";

            _other = AtState.First <ChatMember>(sql);
            if (_other == null)
            {
                // 初次打开,还未下载好友列表
                await FriendMemberList.Refresh();

                _other = AtState.First <ChatMember>(sql);

                // 不在好友列表时,创建虚拟
                if (_other == null)
                {
                    _other = new ChatMember(
                        ID: OtherID,
                        Name: OtherID.ToString(),
                        Photo: "photo/profilephoto.jpg");
                }
            }

            // 不是好友时无法发送
            //_inputBar.Visibility = (_other == null) ? Visibility.Collapsed : Visibility.Visible;

            LetterManager.ClearUnreadFlag(OtherID);
            _lv.PageData = new PageData {
                NextPage = OnNextPage, InsertTop = true
            };
        }
Beispiel #2
0
        async void OnLoaded(object sender, RoutedEventArgs e)
        {
            Loaded -= OnLoaded;

            await FriendMemberList.Refresh();

            LoadLocalList();
        }