refactor: Use more robust and performant way to detect single emoji messages
This commit is contained in:
parent
29fcc223d6
commit
f0aa15843b
4 changed files with 18 additions and 3 deletions
|
|
@ -104,6 +104,8 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
|
||||
String? activeThreadId;
|
||||
|
||||
late final Set<String> bigEmojis;
|
||||
|
||||
late final String readMarkerEventId;
|
||||
|
||||
String get roomId => widget.room.id;
|
||||
|
|
@ -360,6 +362,14 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
AppSettings.displayChatDetailsColumn.value,
|
||||
);
|
||||
|
||||
bigEmojis = defaultEmojiSet.fold(
|
||||
<String>{},
|
||||
(emojis, category) => {
|
||||
...emojis,
|
||||
...(category.emoji.map((emoji) => emoji.emoji)),
|
||||
},
|
||||
);
|
||||
|
||||
sendingClient = Matrix.of(context).client;
|
||||
final lastEventThreadId =
|
||||
room.lastEvent?.relationshipType == RelationshipTypes.thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue