Merge branch 'develop'

This commit is contained in:
syuilo
2019-04-25 07:48:29 +09:00
19 changed files with 262 additions and 180 deletions

View File

@ -106,9 +106,9 @@ export default Vue.extend({
this.init();
},
init() {
async init() {
this.fetching = true;
this.makePromise().then(x => {
await (this.makePromise()).then(x => {
if (Array.isArray(x)) {
this.notes = x;
} else {
@ -123,10 +123,10 @@ export default Vue.extend({
});
},
fetchMore() {
async fetchMore() {
if (!this.more || this.moreFetching || this.notes.length === 0) return;
this.moreFetching = true;
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
await (this.makePromise(this.notes[this.notes.length - 1].id)).then(x => {
this.notes = this.notes.concat(x.notes);
this.more = x.more;
this.moreFetching = false;