This commit is contained in:
syuilo 2019-04-25 07:46:39 +09:00
parent 772258b0b8
commit 0db54386cd
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
14 changed files with 147 additions and 90 deletions

View file

@ -12,6 +12,7 @@
import Vue from 'vue';
import i18n from '../../../i18n';
import Progress from '../../../common/scripts/loading';
import { genSearchQuery } from '../../../common/scripts/gen-search-query';
const limit = 20;
@ -19,10 +20,10 @@ export default Vue.extend({
i18n: i18n('mobile/views/pages/search.vue'),
data() {
return {
makePromise: cursor => this.$root.api('notes/search', {
makePromise: async cursor => this.$root.api('notes/search', {
limit: limit + 1,
untilId: cursor ? cursor : undefined,
query: this.q
...(await genSearchQuery(this, this.q))
}).then(notes => {
if (notes.length == limit + 1) {
notes.pop();