[bugfix/frontend] fix typo and other oddness in patchRemoteEmojis (#2281)

* fix emoji test model

* found the bug!

* remove unused 'current' import

* comment useChecklistReducer

* wah

* lint

* fix cleaner tests
This commit is contained in:
tobi 2023-10-21 17:23:05 +02:00 committed by GitHub
commit 9114c5ca1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 247 additions and 137 deletions

View file

@ -127,11 +127,12 @@ function CopyEmojiForm({ localEmojiCodes, type, emojiList }) {
{
changedOnly: false,
onFinish: ({ data }) => {
if (data != undefined) {
form.selectedEmoji.updateMultiple(
// uncheck all successfully processed emoji
data.map(([id]) => [id, { checked: false }])
);
if (data) {
// uncheck all successfully processed emoji
const processed = data.map((emoji) => {
return [emoji.id, { checked: false }];
});
form.selectedEmoji.updateMultiple(processed);
}
}
}