Commit 9ad31f58 authored by Wilko Manger's avatar Wilko Manger

Fix in-list loading indicator

When it appears and how it looks.
parent f98038dd
......@@ -192,7 +192,7 @@ class ChatBloc extends Bloc<ChatEvent, ChatState> {
);
}
bool endReached = false;
bool endReached;
if (event is RoomCreationEvent) {
endReached = true;
}
......@@ -207,7 +207,7 @@ class ChatBloc extends Bloc<ChatEvent, ChatState> {
return ChatLoaded(
messages: messages,
pageCount: page + 1,
endReached: endReached,
endReached: endReached ?? false,
);
}
}
......
......@@ -272,7 +272,12 @@ class _ChatPageState extends State<ChatPage> {
: state.messages.length + 1,
itemBuilder: (context, index) {
if (index >= state.messages.length) {
return CircularProgressIndicator();
return Center(
child: Padding(
padding: EdgeInsets.all(8),
child: CircularProgressIndicator(),
),
);
}
final message = state.messages[index];
......
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