diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-07-12 00:12:30 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-07-12 00:12:30 +0900 |
| commit | 8ff2694cadd3ab3d51f96fc2ea3bbfde29475660 (patch) | |
| tree | 8b9a1ed4f86530efa90ed504345157ade98ba2b6 /src/client/scripts/paging.ts | |
| parent | chore: Add TODO (diff) | |
| download | sharkey-8ff2694cadd3ab3d51f96fc2ea3bbfde29475660.tar.gz sharkey-8ff2694cadd3ab3d51f96fc2ea3bbfde29475660.tar.bz2 sharkey-8ff2694cadd3ab3d51f96fc2ea3bbfde29475660.zip | |
feat(client): ミューテーション監視をやめてページリロードするように
Diffstat (limited to 'src/client/scripts/paging.ts')
| -rw-r--r-- | src/client/scripts/paging.ts | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts index 8efff7aa41..832f0720e0 100644 --- a/src/client/scripts/paging.ts +++ b/src/client/scripts/paging.ts @@ -22,7 +22,6 @@ export default (opts) => ({ && this.fetchMore() ), loadMoreElement: null as Element, - unsubscribeInfiniteScrollMutation: null as any, }; }, @@ -65,13 +64,6 @@ export default (opts) => ({ this.loadMoreElement = this.$refs.loadMore instanceof Element ? this.$refs.loadMore : this.$refs.loadMore.$el; if (this.$store.state.device.enableInfiniteScroll) this.ilObserver.observe(this.loadMoreElement); this.loadMoreElement.addEventListener('click', this.fetchMore); - - this.unsubscribeInfiniteScrollMutation = this.$store.subscribe(mutation => { - if (mutation.type !== 'device/setInfiniteScrollEnabling') return; - - if (mutation.payload) return this.ilObserver.observe(this.loadMoreElement); - return this.ilObserver.unobserve(this.loadMoreElement); - }); } }); }, @@ -79,7 +71,6 @@ export default (opts) => ({ beforeDestroy() { this.ilObserver.disconnect(); if (this.$refs.loadMore) this.loadMoreElement.removeEventListener('click', this.fetchMore); - if (this.unsubscribeInfiniteScrollMutation) this.unsubscribeInfiniteScrollMutation(); }, methods: { |