summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-27 14:11:18 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-27 14:11:18 +0900
commite86386bd8b977051e1803dcbe73f07afdd876052 (patch)
tree0256900b3a64bcbad78bbe180687fa2df87e7187 /src
parent:art: (diff)
downloadmisskey-e86386bd8b977051e1803dcbe73f07afdd876052.tar.gz
misskey-e86386bd8b977051e1803dcbe73f07afdd876052.tar.bz2
misskey-e86386bd8b977051e1803dcbe73f07afdd876052.zip
#1152
Diffstat (limited to 'src')
-rw-r--r--src/web/app/common/views/components/autocomplete.vue14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/web/app/common/views/components/autocomplete.vue b/src/web/app/common/views/components/autocomplete.vue
index 04a74e4e23..2ad951b1f8 100644
--- a/src/web/app/common/views/components/autocomplete.vue
+++ b/src/web/app/common/views/components/autocomplete.vue
@@ -134,9 +134,21 @@ export default Vue.extend({
} else if (this.type == 'emoji') {
const matched = [];
emjdb.some(x => {
- if (x.name.indexOf(this.q) > -1 && !matched.some(y => y.emoji == x.emoji)) matched.push(x);
+ if (x.name.indexOf(this.q) == 0 && !x.alias && !matched.some(y => y.emoji == x.emoji)) matched.push(x);
return matched.length == 30;
});
+ if (matched.length < 30) {
+ emjdb.some(x => {
+ if (x.name.indexOf(this.q) == 0 && !matched.some(y => y.emoji == x.emoji)) matched.push(x);
+ return matched.length == 30;
+ });
+ }
+ if (matched.length < 30) {
+ emjdb.some(x => {
+ if (x.name.indexOf(this.q) > -1 && !matched.some(y => y.emoji == x.emoji)) matched.push(x);
+ return matched.length == 30;
+ });
+ }
this.emojis = matched;
}
},