FurryChat/lib/utils/client_presence_extension.dart
Christian Pauly eb11ad9e5a Clean up
2020-05-06 19:26:59 +02:00

11 lines
327 B
Dart

import 'package:famedlysdk/famedlysdk.dart';
extension ClientPresenceExtension on Client {
List<Presence> get statusList {
final statusList = presences.values.toList();
statusList.removeWhere((p) => p.statusMsg?.isEmpty ?? true);
statusList.sort((a, b) => b.time.compareTo(a.time));
return statusList;
}
}