Clean up
This commit is contained in:
parent
10eaf1ffc5
commit
3ae4f234ab
7 changed files with 213 additions and 170 deletions
|
|
@ -3,6 +3,7 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ extension PresenceExtension on Presence {
|
|||
if (statusMsg?.isNotEmpty ?? false) {
|
||||
return statusMsg;
|
||||
}
|
||||
if (displayname != null) {
|
||||
return I18n.of(context)
|
||||
.changedTheDisplaynameTo(sender.localpart, displayname);
|
||||
}
|
||||
return I18n.of(context).lastActiveAgo(time.localizedTimeShort(context));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue