heavyrain2012 5 年之前
父节点
当前提交
7db81d4e48
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      wfuikit/WFChatUIKit/MessageList/ViewController/WFCUMessageListViewController.m

+ 7 - 1
wfuikit/WFChatUIKit/MessageList/ViewController/WFCUMessageListViewController.m

@@ -721,7 +721,13 @@
             self.hasNewMessage = YES;
         }
     } else {
-        messageList = [[WFCCIMService sharedWFCIMService] getMessages:self.conversation contentTypes:nil from:0 count:15 withUser:self.privateChatUser];
+        int count = self.modelList.count;
+        if (count > 50) {
+            count = 50;
+        } else if(count == 0) {
+            count = 15;
+        }
+        messageList = [[WFCCIMService sharedWFCIMService] getMessages:self.conversation contentTypes:nil from:0 count:count withUser:self.privateChatUser];
         [[WFCCIMService sharedWFCIMService] clearUnreadStatus:self.conversation];
     }