소스 검색

:recycle: removing fetch tag from getPosts

tags/0.9.0
J 4 년 전
부모
커밋
589ccaa85e
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2
    5
      vue-theme/src/pages/list.vue

+ 2
- 5
vue-theme/src/pages/list.vue 파일 보기

113
             }
113
             }
114
         },
114
         },
115
         async getPosts() {
115
         async getPosts() {
116
-            
117
             let dispatchAction = `getMore${this.pType}`
116
             let dispatchAction = `getMore${this.pType}`
118
             let params = this._getDispatchParams()
117
             let params = this._getDispatchParams()
119
             
118
             
120
             // For episodes or material sort we grab EVERYTHING
119
             // For episodes or material sort we grab EVERYTHING
121
-            if(this.type == 'episde' || this.type == 'artist' && this._getSortBy() == sortTypes.material) {
120
+            if(this.type == 'episode' || this.type == 'artist' && this._getSortBy() == sortTypes.material) {
122
                 dispatchAction = `getAll${this.pType}`
121
                 dispatchAction = `getAll${this.pType}`
123
                 params = this._getDispatchParams(-1)
122
                 params = this._getDispatchParams(-1)
124
-                this.keepFetching = false
125
             }
123
             }
126
 
124
 
127
-            const ignore = [`getMoreEpisodes`, 'getMorePages']
125
+            const ignore = ['getMorePages']
128
             let res = null
126
             let res = null
129
             if(this.pType && !ignore.includes(dispatchAction) && this.keepFetching) {
127
             if(this.pType && !ignore.includes(dispatchAction) && this.keepFetching) {
130
                 res = await this.$store.dispatch(dispatchAction, params)
128
                 res = await this.$store.dispatch(dispatchAction, params)
157
         },
155
         },
158
         setIntersectionLoader() {
156
         setIntersectionLoader() {
159
             if(!this.type) return console.error('cannot setup intersection handler for undefined type')
157
             if(!this.type) return console.error('cannot setup intersection handler for undefined type')
160
-            
161
             console.log('Setting interesection loader...')
158
             console.log('Setting interesection loader...')
162
             
159
             
163
             const footerEl = document.querySelector(INTERSECT_SELECTOR)
160
             const footerEl = document.querySelector(INTERSECT_SELECTOR)

Loading…
취소
저장