aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index b271bc9..5040b0f 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -10012,6 +10012,7 @@ export function messagesFeature(ctx) {
});
},
}),
+ gifs.button('reply', 'attach-btn gif-btn'),
h('span', { class: 'grow' }),
h('div', { class: 'row gap6 composer-options' },
previewBtn(!!s.preview, () => { s.preview = !s.preview; render(); }),
@@ -10038,7 +10039,16 @@ export function messagesFeature(ctx) {
} catch (e) { if (!e.silent) toast(e.message); }
s.sending = false; render();
},
- }, s.sending ? h('span', { class: 'spinner sm' }) : t('threadReplySend'))));
+ }, s.sending ? h('span', { class: 'spinner sm' }) : t('threadReplySend'))),
+ // a picked GIF lands in the draft like an attachment, with its imeta
+ gifs.sheet('reply', (g) => {
+ s.draft = ((s.draft || '').replace(/\s+$/, '') + ' ' + g.url).trim();
+ (ui.postMedia ||= []).push(gifMedia(g));
+ const inp = document.querySelector('.thread-reply-input');
+ if (inp) inp.value = s.draft;
+ s.preview = true;
+ render();
+ }));
// rows with the reply box slotted under the focused note (the root when
// nothing narrower is focused; appended at the end if the focused note
// hasn't loaded yet, so the box never disappears entirely)