add settings for image packs

Closes #131
This commit is contained in:
Henry Hiles 2026-10-26 12:05:45 -04:00
commit 4b329b4c6f
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -271,28 +271,30 @@ class const Composer(
onPressed: () => context.showAdaptiveSheet(
(context) => EmojiPicker(
roomId: roomId,
onSelection: (value, {shortcode}) {
Navigator.of(context).pop();
if (shortcode == null) {
controller.text += value;
} else {
final text = "${controller.text}:";
controller.value = .new(
text: text,
selection: .collapsed(
offset: text.length,
),
);
controller.addTag(
id: ImagePack.emojiMarkdown(
shortcode,
value,
),
name: shortcode,
);
}
node?.requestFocus();
},
onSelection:
(value, {shortcode, description}) {
Navigator.of(context).pop();
if (shortcode == null) {
controller.text += value;
} else {
final text = "${controller.text}:";
controller.value = .new(
text: text,
selection: .collapsed(
offset: text.length,
),
);
controller.addTag(
id: ImagePack.emojiMarkdown(
shortcode,
value,
description: description,
),
name: shortcode,
);
}
node?.requestFocus();
},
),
),
icon: Icon(Icons.emoji_emotions),