mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +02:00
chore: upgrade to mithril 2.2 (#3831)
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
@@ -58,12 +58,7 @@ export default class PostMention extends MentionableModel<Post, AtMentionFormat>
|
||||
|
||||
suggestion(model: Post, typed: string): Mithril.Children {
|
||||
const user = model.user() || null;
|
||||
const username = usernameHelper(user);
|
||||
|
||||
if (typed) {
|
||||
username.children = [highlight((username.text ?? '') as string, typed)];
|
||||
delete username.text;
|
||||
}
|
||||
const username = usernameHelper(user, (name: string) => highlight(name, typed));
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@@ -42,12 +42,7 @@ export default class UserMention extends MentionableModel<User, AtMentionFormat>
|
||||
}
|
||||
|
||||
suggestion(model: User, typed: string): Mithril.Children {
|
||||
const username = usernameHelper(model);
|
||||
|
||||
if (typed) {
|
||||
username.children = [highlight((username.text ?? '') as string, typed)];
|
||||
delete username.text;
|
||||
}
|
||||
const username = usernameHelper(model, (name: string) => highlight(name, typed));
|
||||
|
||||
return (
|
||||
<>
|
||||
|
Reference in New Issue
Block a user