mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 18:12:25 -05:00
[bugfix] fix 'steal this look' form, uncheck entries after processing (#1454)
This commit is contained in:
parent
4e4da19720
commit
52fbb3e584
4 changed files with 27 additions and 6 deletions
|
|
@ -115,12 +115,26 @@ function CopyEmojiForm({ localEmojiCodes, type, emojiList }) {
|
|||
const form = {
|
||||
selectedEmoji: useCheckListInput("selectedEmoji", {
|
||||
entries: emojiList,
|
||||
uniqueKey: "shortcode"
|
||||
uniqueKey: "id"
|
||||
}),
|
||||
category: useComboBoxInput("category")
|
||||
};
|
||||
|
||||
const [formSubmit, result] = useFormSubmit(form, query.usePatchRemoteEmojisMutation(), { changedOnly: false });
|
||||
const [formSubmit, result] = useFormSubmit(
|
||||
form,
|
||||
query.usePatchRemoteEmojisMutation(),
|
||||
{
|
||||
changedOnly: false,
|
||||
onFinish: ({ data }) => {
|
||||
if (data != undefined) {
|
||||
form.selectedEmoji.updateMultiple(
|
||||
// uncheck all successfully processed emoji
|
||||
data.map(([id]) => [id, { checked: false }])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const buttonsInactive = form.selectedEmoji.someSelected
|
||||
? {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue