Browse Source

[Fix]处理聊天记录load more失败问题

zhipeng 1 year ago
parent
commit
0de5a58952

+ 1 - 1
lib/data/api/request/chat_history_request.dart

@@ -12,7 +12,7 @@ class ChatHistoryRequest extends AppBaseRequest {
   int pageSize;
 
   @JsonKey(name: 'id')
-  int? lastId;
+  String? lastId;
 
   ChatHistoryRequest(this.pageCount, this.pageSize, this.lastId);
 

+ 1 - 1
lib/data/repositories/chat_repository.dart

@@ -38,7 +38,7 @@ class ChatRepository {
     }).then((stream) => SSEParseUtil.parse(stream));
   }
 
-  Future<List<ChatItem>> chatHistory(int? lastId) {
+  Future<List<ChatItem>> chatHistory(String? lastId) {
     return atmobApi
         .chatHistory(ChatHistoryRequest(1, 20, lastId))
         .then(HttpHandler.handle(true))