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 != null) {
if (res is MentionItem) { if (res is MentionItem) {
_onInsertUser(res, fromClick); _onInsertUser(res, fromClick);
} else if (res is Iterable<MentionItem>) { } else if (res is Set<MentionItem>) {
for (var e in res) { for (var e in res) {
e.checked = null;
_onInsertUser(e, fromClick); _onInsertUser(e, fromClick);
} }
res.clear();
} }
} }
controller.restoreChatPanel(); controller.restoreChatPanel();

View File

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