opt multi mention

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-09 19:15:34 +08:00
parent 58f3949a22
commit 829b966382
2 changed files with 5 additions and 8 deletions

View File

@@ -248,10 +248,12 @@ abstract class CommonRichTextPubPageState<T extends CommonRichTextPubPage>
if (res != null) {
if (res is MentionItem) {
_onInsertUser(res, fromClick);
} else if (res is Iterable<MentionItem>) {
} else if (res is Set<MentionItem>) {
for (var e in res) {
e.checked = null;
_onInsertUser(e, fromClick);
}
res.clear();
}
}
controller.restoreChatPanel();

View File

@@ -208,13 +208,8 @@ class _DynMentionPanelState extends State<DynMentionPanel> {
_controller.showBtn.value = false;
return;
}
Get.back(result: _controller.mentionList!.toSet());
for (var e in _controller.mentionList!) {
e.checked = null;
}
_controller
..mentionList!.clear()
..showBtn.value = false;
Get.back(result: _controller.mentionList);
_controller.showBtn.value = false;
},
child: const Icon(Icons.check),
),