implemented backward pagination for chat history with on-scroll prefetching
This commit is contained in:
@@ -12,6 +12,8 @@ _ChatState _$ChatStateFromJson(Map<String, dynamic> json) => _ChatState(
|
||||
? null
|
||||
: GetChatResponse.fromJson(json['chatResponse'] as Map<String, dynamic>),
|
||||
referenceMessageId: (json['referenceMessageId'] as num?)?.toInt(),
|
||||
hasMoreOld: json['hasMoreOld'] as bool? ?? true,
|
||||
isLoadingOlder: json['isLoadingOlder'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChatStateToJson(_ChatState instance) =>
|
||||
@@ -19,4 +21,6 @@ Map<String, dynamic> _$ChatStateToJson(_ChatState instance) =>
|
||||
'currentToken': instance.currentToken,
|
||||
'chatResponse': instance.chatResponse,
|
||||
'referenceMessageId': instance.referenceMessageId,
|
||||
'hasMoreOld': instance.hasMoreOld,
|
||||
'isLoadingOlder': instance.isLoadingOlder,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user