Load more messages if not enough are loaded yet

parent b3eeed5d
......@@ -174,6 +174,10 @@ class ChatBloc extends Bloc<ChatEvent, ChatState> {
.toList()
: <ChatMessage>[];
if (messages.length + newMessages.length < _pageSize) {
add(LoadMoreFromTimeline());
}
return ChatState(
chat: chat,
messages: messages,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment