mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
Improve performance
This commit is contained in:
parent
ab692cfa3d
commit
ab166959a4
2 changed files with 5 additions and 6 deletions
|
@ -28,7 +28,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import { emojilist } from '../../misc/emojilist';
|
||||
import contains from '@/scripts/contains';
|
||||
import { twemojiSvgBase } from '../../misc/twemoji-base';
|
||||
|
@ -124,7 +124,6 @@ export default defineComponent({
|
|||
emojis: [],
|
||||
items: [],
|
||||
select: -1,
|
||||
emojilist,
|
||||
emojiDb: [] as EmojiDef[]
|
||||
}
|
||||
},
|
||||
|
@ -178,7 +177,7 @@ export default defineComponent({
|
|||
|
||||
emojiDefinitions.sort((a, b) => a.name.length - b.name.length);
|
||||
|
||||
this.emojiDb = emojiDefinitions.concat(emjdb);
|
||||
this.emojiDb = markRaw(emojiDefinitions.concat(emjdb));
|
||||
//#endregion
|
||||
|
||||
this.textarea.addEventListener('keydown', this.onKeydown);
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import { emojilist } from '../../misc/emojilist';
|
||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import { faAsterisk, faLeaf, faUtensils, faFutbol, faCity, faDice, faGlobe, faHistory, faUser } from '@fortawesome/free-solid-svg-icons';
|
||||
|
@ -86,7 +86,7 @@ export default defineComponent({
|
|||
|
||||
data() {
|
||||
return {
|
||||
emojilist,
|
||||
emojilist: markRaw(emojilist),
|
||||
getStaticImageUrl,
|
||||
customEmojis: {},
|
||||
faGlobe, faHistory,
|
||||
|
@ -137,7 +137,7 @@ export default defineComponent({
|
|||
created() {
|
||||
let local = this.$store.state.instance.meta.emojis;
|
||||
local = groupByX(local, (x: any) => x.category || '');
|
||||
this.customEmojis = local;
|
||||
this.customEmojis = markRaw(local);
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
Loading…
Reference in a new issue