Clean up design
This commit is contained in:
parent
5758a11a60
commit
48b2f702ad
5 changed files with 14 additions and 12 deletions
|
|
@ -437,14 +437,16 @@ class _ChatListState extends State<ChatList> {
|
|||
rooms.length + publicRoomsCount;
|
||||
final directChats =
|
||||
rooms.where((r) => r.isDirectChat).toList();
|
||||
directChats.sort((a, b) => Matrix.of(context)
|
||||
.client
|
||||
.presences[b.directChatMatrixID]
|
||||
?.presence
|
||||
?.statusMsg !=
|
||||
null
|
||||
? 1
|
||||
: -1);
|
||||
final presences =
|
||||
Matrix.of(context).client.presences;
|
||||
directChats.sort((a, b) =>
|
||||
presences[b.directChatMatrixID]
|
||||
?.presence
|
||||
?.statusMsg !=
|
||||
null
|
||||
? 1
|
||||
: a.lastEvent.originServerTs.compareTo(
|
||||
b.lastEvent.originServerTs));
|
||||
return ListView.separated(
|
||||
controller: _scrollController,
|
||||
separatorBuilder:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue