Improve warp
This commit is contained in:
@@ -36,6 +36,7 @@ export default Vue.extend({
|
||||
includeReplies: this.mode == 'with-replies',
|
||||
includeMyRenotes: this.mode != 'my-posts',
|
||||
withFiles: this.mode == 'with-media',
|
||||
untilDate: cursor ? undefined : (this.date ? this.date.getTime() : undefined),
|
||||
untilId: cursor ? cursor : undefined
|
||||
}).then(notes => {
|
||||
if (notes.length == fetchLimit + 1) {
|
||||
@@ -62,10 +63,11 @@ export default Vue.extend({
|
||||
|
||||
mounted() {
|
||||
document.addEventListener('keydown', this.onDocumentKeydown);
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('keydown', this.onDocumentKeydown);
|
||||
this.$root.$on('warp', this.warp);
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
this.$root.$off('warp', this.warp);
|
||||
document.removeEventListener('keydown', this.onDocumentKeydown);
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
Reference in New Issue
Block a user