Fix top list

This commit is contained in:
Christian Pauly 2020-06-19 15:10:26 +02:00
commit 3fa51d74a9
6 changed files with 65 additions and 72 deletions

View file

@ -1,16 +1,6 @@
import 'package:famedlysdk/famedlysdk.dart';
extension ClientPresenceExtension on Client {
List<Presence> get statusList {
final statusList = presences.values.toList().reversed.toList();
final directRooms = rooms.where((r) => r.isDirectChat).toList();
statusList.removeWhere((p) =>
directRooms.indexWhere((r) => r.directChatMatrixID == p.senderId) ==
-1);
statusList.reversed.toList();
return statusList;
}
static final Map<String, Profile> presencesCache = {};
Future<Profile> requestProfileCached(String senderId) async {