Clean up everything
This commit is contained in:
parent
cccbd7557e
commit
f4ef4eeea9
15 changed files with 617 additions and 375 deletions
13
lib/utils/room_extension.dart
Normal file
13
lib/utils/room_extension.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
extension LocalizedRoomDisplayname on Room {
|
||||
String getLocalizedDisplayname(BuildContext context) {
|
||||
if ((this.name?.isEmpty ?? true) &&
|
||||
(this.canonicalAlias?.isEmpty ?? true) &&
|
||||
!this.isDirectChat) {
|
||||
return "Group with ${this.displayname}";
|
||||
}
|
||||
return this.displayname;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue