Skip to content

Commit

Permalink
✌️
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Jan 22, 2023
1 parent 0b2f945 commit 226e0c4
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/frontend/src/pages/custom-emojis-manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import { selectFile, selectFiles } from '@/scripts/select-file';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { fetchCustomEmojis, customEmojis } from '@/custom-emojis';
const emojisPaginationComponent = shallowRef<InstanceType<typeof MkPagination>>();
Expand Down Expand Up @@ -131,7 +130,6 @@ const add = async (ev: MouseEvent) => {
})));
promise.then(() => {
emojisPaginationComponent.value.reload();
fetchCustomEmojis();
});
os.promiseDialog(promise);
};
Expand All @@ -146,26 +144,8 @@ const edit = (emoji) => {
...oldEmoji,
...result.updated,
}));
if (!customEmojis.value.some(e => e.name === emoji.name)) {
customEmojis.value = [
{
name: result.updated.name,
aliases: result.updated.aliases,
category: result.updated.category,
},
...customEmojis.value,
];
} else {
customEmojis.value = customEmojis.value.map(e => e.name !== emoji.name ? e : {
name: result.updated.name,
aliases: result.updated.aliases,
category: result.updated.category,
});
}
} else if (result.deleted) {
emojisPaginationComponent.value.removeItem((item) => item.id === emoji.id);
customEmojis.value = customEmojis.value.filter(e => e.name !== emoji.name);
}
},
}, 'closed');
Expand Down Expand Up @@ -240,7 +220,6 @@ const setCategoryBulk = async () => {
category: result,
});
emojisPaginationComponent.value.reload();
fetchCustomEmojis();
};
const addTagBulk = async () => {
Expand All @@ -253,7 +232,6 @@ const addTagBulk = async () => {
aliases: result.split(' '),
});
emojisPaginationComponent.value.reload();
fetchCustomEmojis();
};
const removeTagBulk = async () => {
Expand All @@ -266,7 +244,6 @@ const removeTagBulk = async () => {
aliases: result.split(' '),
});
emojisPaginationComponent.value.reload();
fetchCustomEmojis();
};
const setTagBulk = async () => {
Expand All @@ -279,7 +256,6 @@ const setTagBulk = async () => {
aliases: result.split(' '),
});
emojisPaginationComponent.value.reload();
fetchCustomEmojis();
};
const delBulk = async () => {
Expand All @@ -292,7 +268,6 @@ const delBulk = async () => {
ids: selectedEmojis.value,
});
emojisPaginationComponent.value.reload();
fetchCustomEmojis();
};
const headerActions = $computed(() => [{
Expand Down

0 comments on commit 226e0c4

Please sign in to comment.