|
|
|
@ -392,12 +392,9 @@ class _ChatListState extends State<ChatList> {
|
|
|
|
|
final int publicRoomsCount =
|
|
|
|
|
(publicRoomsResponse?.publicRooms?.length ?? 0);
|
|
|
|
|
final int totalCount = rooms.length + publicRoomsCount;
|
|
|
|
|
return selectMode == SelectMode.share
|
|
|
|
|
? Container()
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
controller: _scrollController,
|
|
|
|
|
separatorBuilder: (BuildContext context,
|
|
|
|
|
int i) =>
|
|
|
|
|
separatorBuilder: (BuildContext context, int i) =>
|
|
|
|
|
i == totalCount - publicRoomsCount
|
|
|
|
|
? Material(
|
|
|
|
|
elevation: 2,
|
|
|
|
@ -410,25 +407,24 @@ class _ChatListState extends State<ChatList> {
|
|
|
|
|
itemCount: totalCount + 1,
|
|
|
|
|
itemBuilder: (BuildContext context, int i) {
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
return Matrix.of(context)
|
|
|
|
|
return (Matrix.of(context)
|
|
|
|
|
.client
|
|
|
|
|
.statusList
|
|
|
|
|
.isEmpty
|
|
|
|
|
.isEmpty ||
|
|
|
|
|
selectMode == SelectMode.share)
|
|
|
|
|
? Container()
|
|
|
|
|
: PreferredSize(
|
|
|
|
|
preferredSize: Size.fromHeight(89),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 81,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection:
|
|
|
|
|
Axis.horizontal,
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
itemCount: Matrix.of(context)
|
|
|
|
|
.client
|
|
|
|
|
.statusList
|
|
|
|
|
.length,
|
|
|
|
|
itemBuilder:
|
|
|
|
|
(BuildContext context,
|
|
|
|
|
int i) =>
|
|
|
|
|
(BuildContext context, int i) =>
|
|
|
|
|
PresenceListItem(
|
|
|
|
|
Matrix.of(context)
|
|
|
|
|
.client
|
|
|
|
|