chore: Fix spaces
This commit is contained in:
parent
f6497aac30
commit
4aa2da5fae
1 changed files with 3 additions and 2 deletions
|
|
@ -302,13 +302,14 @@ class _ChatListViewBodyState extends State<_ChatListViewBody> {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
final displayStoriesHeader = widget.controller.activeSpaceId == null;
|
||||||
child = ListView.builder(
|
child = ListView.builder(
|
||||||
key: ValueKey(Matrix.of(context).client.userID.toString() +
|
key: ValueKey(Matrix.of(context).client.userID.toString() +
|
||||||
widget.controller.activeSpaceId.toString()),
|
widget.controller.activeSpaceId.toString()),
|
||||||
controller: widget.controller.scrollController,
|
controller: widget.controller.scrollController,
|
||||||
itemCount: rooms.length + 1,
|
itemCount: rooms.length + (displayStoriesHeader ? 1 : 0),
|
||||||
itemBuilder: (BuildContext context, int i) {
|
itemBuilder: (BuildContext context, int i) {
|
||||||
if (i == 0 && widget.controller.activeSpaceId == null) {
|
if (i == 0 && displayStoriesHeader) {
|
||||||
return const StoriesHeader();
|
return const StoriesHeader();
|
||||||
}
|
}
|
||||||
i--;
|
i--;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue