Fix bug
This commit is contained in:
parent
100557e975
commit
d29459fa37
6 changed files with 46 additions and 12 deletions
|
|
@ -120,12 +120,14 @@ export default Vue.extend({
|
|||
|
||||
this.moreFetching = true;
|
||||
|
||||
(this as any).api(this.endpoint, {
|
||||
const promise = (this as any).api(this.endpoint, {
|
||||
limit: fetchLimit + 1,
|
||||
untilId: (this.$refs.timeline as any).tail().id,
|
||||
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
|
||||
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
|
||||
}).then(notes => {
|
||||
});
|
||||
|
||||
promise.then(notes => {
|
||||
if (notes.length == fetchLimit + 1) {
|
||||
notes.pop();
|
||||
} else {
|
||||
|
|
@ -134,6 +136,8 @@ export default Vue.extend({
|
|||
notes.forEach(n => (this.$refs.timeline as any).append(n));
|
||||
this.moreFetching = false;
|
||||
});
|
||||
|
||||
return promise;
|
||||
},
|
||||
|
||||
onNote(note) {
|
||||
|
|
|
|||
|
|
@ -62,13 +62,15 @@ export default Vue.extend({
|
|||
more() {
|
||||
this.moreFetching = true;
|
||||
|
||||
(this as any).api('notes/user-list-timeline', {
|
||||
const promise = (this as any).api('notes/user-list-timeline', {
|
||||
listId: this.list.id,
|
||||
limit: fetchLimit + 1,
|
||||
untilId: (this.$refs.timeline as any).tail().id,
|
||||
includeMyRenotes: (this as any).clientSettings.showMyRenotes,
|
||||
includeRenotedMyNotes: (this as any).clientSettings.showRenotedMyNotes
|
||||
}).then(notes => {
|
||||
});
|
||||
|
||||
promise.then(notes => {
|
||||
if (notes.length == fetchLimit + 1) {
|
||||
notes.pop();
|
||||
} else {
|
||||
|
|
@ -77,6 +79,8 @@ export default Vue.extend({
|
|||
notes.forEach(n => (this.$refs.timeline as any).append(n));
|
||||
this.moreFetching = false;
|
||||
});
|
||||
|
||||
return promise;
|
||||
},
|
||||
onNote(note) {
|
||||
// Prepend a note
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue