1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-02 00:38:14 +09:00
This commit is contained in:
syuilo 2018-11-06 02:05:16 +09:00
parent 64f89ba13e
commit 6d8ea89f09
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 6 additions and 1 deletions

View File

@ -215,6 +215,11 @@ export default Vue.extend({
} }
} }
} else if (this.type == 'emoji') { } else if (this.type == 'emoji') {
if (this.q == null || this.q == '') {
this.emojis = this.emojiDb.filter(x => x.isCustomEmoji && !x.aliasOf);
return;
}
const matched = []; const matched = [];
const max = 30; const max = 30;

View File

@ -109,7 +109,7 @@ class Autocomplete {
if (isEmoji && opened == false) { if (isEmoji && opened == false) {
const emoji = text.substr(emojiIndex + 1); const emoji = text.substr(emojiIndex + 1);
if (emoji != '' && emoji.match(/^[\+\-a-z0-9_]+$/)) { if (!emoji.includes(' ')) {
this.open('emoji', emoji); this.open('emoji', emoji);
opened = true; opened = true;
} }