hide presences in share mode
This commit is contained in:
parent
da7b6ac27b
commit
2f42cddd08
|
@ -392,56 +392,61 @@ class _ChatListState extends State<ChatList> {
|
||||||
final int publicRoomsCount =
|
final int publicRoomsCount =
|
||||||
(publicRoomsResponse?.publicRooms?.length ?? 0);
|
(publicRoomsResponse?.publicRooms?.length ?? 0);
|
||||||
final int totalCount = rooms.length + publicRoomsCount;
|
final int totalCount = rooms.length + publicRoomsCount;
|
||||||
return ListView.separated(
|
return selectMode == SelectMode.share
|
||||||
controller: _scrollController,
|
? Container()
|
||||||
separatorBuilder: (BuildContext context, int i) =>
|
: ListView.separated(
|
||||||
i == totalCount - publicRoomsCount
|
controller: _scrollController,
|
||||||
? Material(
|
separatorBuilder: (BuildContext context,
|
||||||
elevation: 2,
|
int i) =>
|
||||||
child: ListTile(
|
i == totalCount - publicRoomsCount
|
||||||
title: Text(
|
? Material(
|
||||||
L10n.of(context).publicRooms),
|
elevation: 2,
|
||||||
),
|
child: ListTile(
|
||||||
)
|
title: Text(
|
||||||
: Container(),
|
L10n.of(context).publicRooms),
|
||||||
itemCount: totalCount + 1,
|
),
|
||||||
itemBuilder: (BuildContext context, int i) {
|
)
|
||||||
if (i == 0) {
|
: Container(),
|
||||||
return Matrix.of(context)
|
itemCount: totalCount + 1,
|
||||||
.client
|
itemBuilder: (BuildContext context, int i) {
|
||||||
.statusList
|
if (i == 0) {
|
||||||
.isEmpty
|
return Matrix.of(context)
|
||||||
? Container()
|
.client
|
||||||
: PreferredSize(
|
.statusList
|
||||||
preferredSize: Size.fromHeight(89),
|
.isEmpty
|
||||||
child: Container(
|
? Container()
|
||||||
height: 81,
|
: PreferredSize(
|
||||||
child: ListView.builder(
|
preferredSize: Size.fromHeight(89),
|
||||||
scrollDirection: Axis.horizontal,
|
child: Container(
|
||||||
itemCount: Matrix.of(context)
|
height: 81,
|
||||||
.client
|
child: ListView.builder(
|
||||||
.statusList
|
scrollDirection:
|
||||||
.length,
|
Axis.horizontal,
|
||||||
itemBuilder:
|
itemCount: Matrix.of(context)
|
||||||
(BuildContext context, int i) =>
|
.client
|
||||||
PresenceListItem(
|
.statusList
|
||||||
Matrix.of(context)
|
.length,
|
||||||
.client
|
itemBuilder:
|
||||||
.statusList[i]),
|
(BuildContext context,
|
||||||
),
|
int i) =>
|
||||||
),
|
PresenceListItem(
|
||||||
);
|
Matrix.of(context)
|
||||||
}
|
.client
|
||||||
i--;
|
.statusList[i]),
|
||||||
return i < rooms.length
|
),
|
||||||
? ChatListItem(
|
),
|
||||||
rooms[i],
|
);
|
||||||
activeChat:
|
}
|
||||||
widget.activeChat == rooms[i].id,
|
i--;
|
||||||
)
|
return i < rooms.length
|
||||||
: PublicRoomListItem(publicRoomsResponse
|
? ChatListItem(
|
||||||
.publicRooms[i - rooms.length]);
|
rooms[i],
|
||||||
});
|
activeChat:
|
||||||
|
widget.activeChat == rooms[i].id,
|
||||||
|
)
|
||||||
|
: PublicRoomListItem(publicRoomsResponse
|
||||||
|
.publicRooms[i - rooms.length]);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return Center(
|
return Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
|
|
Loading…
Reference in a new issue