FurryChat/lib/utils/room_name_calculator.dart
Christian Pauly 71053ff4d2 Fix chat list
2020-01-17 09:21:12 +01:00

17 lines
361 B
Dart

import 'package:famedlysdk/famedlysdk.dart';
class RoomNameCalculator {
final Room room;
const RoomNameCalculator(this.room);
String get name {
if ((room.name?.isEmpty ?? true) &&
(room.canonicalAlias?.isEmpty ?? true) &&
!room.isDirectChat) {
return "Group with ${room.displayname}";
}
return room.displayname;
}
}