public async Task <string> UpdatePostBySender(Post newPost)
        {
            var result = await postSystem.UpdatePostBySender(newPost, account.Id);

            await UpdatePage.PostSystemUpdate();

            return(result);
        }
        public async Task <string> RemoveComment(string postId, string commentId)
        {
            var result = await postSystem.RemoveComment(postId, commentId, account.Id);

            await UpdatePage.PostSystemUpdate();

            return(result);
        }
        public async Task <string> AddComment(string postId, Comment comment)
        {
            var result = await postSystem.AddComment(postId, comment, account.Id);

            await UpdatePage.PostSystemUpdate();

            return(result);
        }
        public async Task <string> UpdatePostLike(string postId)
        {
            var result = await postSystem.UpdatePostLike(postId, account.Id);

            await UpdatePage.PostSystemUpdate();

            return(result);
        }
        public async Task <string> AddPost(Post post)
        {
            var result = await postSystem.AddPost(post, account.Id);

            await UpdatePage.PostSystemUpdate();

            return(result);
        }
 public string SendGroupMessage(GroupMessage message)
 {
     if (!HasFunction(FunctionType.ChatSystem))
     {
         offlineGroupMessageList.AddMessage(message);
         UpdatePage.ChatSystemUpdate();
     }
     return(chatSystemClient.SendGroupMessagePackage(message));
 }
 public void SystemOnLine(FunctionType functionType)
 {
     FunctionTypes.Add(functionType);
     new Thread(() =>
     {
         if (functionType == FunctionType.ChatSystem)
         {
             if (offlinePrivateMessageList.GetSize() > 0)
             {
                 chatSystemClient.SendPrivateMessagePackage(offlinePrivateMessageList);
                 offlinePrivateMessageList = new PrivateMessageList();
             }
             if (offlineGroupMessageList.GetSize() > 0)
             {
                 chatSystemClient.SendGroupMessagePackage(offlineGroupMessageList);
                 offlineGroupMessageList = new GroupMessageList();
             }
             UpdatePage.ChatSystemUpdate();
         }
     }).Start();
 }
 public void UpdateFriendList(FriendList friendList)
 {
     this.friendList = friendList;
     UpdatePage.UserSystemUpdate();
 }
 public void UpdateAccount(Account account)
 {
     this.account = account;
     UpdatePage.UserSystemUpdate();
 }
 public void AddGroupMessage(GroupMessage newMessage)
 {
     groupMessageList.AddMessage(newMessage);
     UpdatePage.ChatSystemUpdate();
 }
 public void AddPrivateMessage(PrivateMessage newMessage)
 {
     privateMessageList.AddMessage(newMessage);
     UpdatePage.ChatSystemUpdate();
 }
 public void UpdateGroupMessageList(GroupMessageList groupMessageList)
 {
     this.groupMessageList = groupMessageList.Copy();
     UpdatePage.ChatSystemUpdate();
 }
 public void UpdatePrivateMessageList(PrivateMessageList privateMessageList)
 {
     this.privateMessageList = privateMessageList.Copy();
     UpdatePage.ChatSystemUpdate();
 }
 public void UpdateChatGroupList(ChatGroupList chatGroupList)
 {
     this.chatGroupList.GroupList = chatGroupList.Copy().GroupList;
     UpdatePage.ChatSystemUpdate();
 }
        public async Task RemovePost(string postId)
        {
            await postSystem.RemovePost(postId, account.Id);

            await UpdatePage.PostSystemUpdate();
        }