mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
Merge branch 'td/suggestions_fix' into 'main'
fix: suggestions menu and use empty map in html messages null return See merge request famedly/fluffychat!705
This commit is contained in:
commit
dfa58cfe05
@ -95,7 +95,7 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
final identityParts = url.parseIdentifierIntoParts();
|
final identityParts = url.parseIdentifierIntoParts();
|
||||||
final identifier = identityParts?.primaryIdentifier;
|
final identifier = identityParts?.primaryIdentifier;
|
||||||
if (identifier == null) {
|
if (identifier == null) {
|
||||||
return {'': null};
|
return {};
|
||||||
}
|
}
|
||||||
if (identifier.sigil == '@') {
|
if (identifier.sigil == '@') {
|
||||||
// we have a user pill
|
// we have a user pill
|
||||||
@ -127,13 +127,13 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {'': null};
|
return {};
|
||||||
}
|
}
|
||||||
if (identifier.sigil == '!') {
|
if (identifier.sigil == '!') {
|
||||||
// we have a room ID pill
|
// we have a room ID pill
|
||||||
final r = room.client.getRoomById(identifier);
|
final r = room.client.getRoomById(identifier);
|
||||||
if (r == null) {
|
if (r == null) {
|
||||||
return {'': null};
|
return {};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
'displayname':
|
'displayname':
|
||||||
@ -141,7 +141,7 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {'': null};
|
return {};
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ class InputBar extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
final searchText =
|
final searchText =
|
||||||
controller!.text.substring(0, controller!.selection.baseOffset);
|
controller!.text.substring(0, controller!.selection.baseOffset);
|
||||||
final List<Map<String, String?>> ret = <Map<String, String>>[];
|
final List<Map<String, String?>> ret = <Map<String, String?>>[];
|
||||||
const maxResults = 30;
|
const maxResults = 30;
|
||||||
|
|
||||||
final commandMatch = RegExp(r'^\/([\w]*)$').firstMatch(searchText);
|
final commandMatch = RegExp(r'^\/([\w]*)$').firstMatch(searchText);
|
||||||
|
Loading…
Reference in New Issue
Block a user