Sfoglia il codice sorgente

:recycle: removing fetch tag from getPosts

tags/0.9.0
J 4 anni fa
parent
commit
589ccaa85e
1 ha cambiato i file con 2 aggiunte e 5 eliminazioni
  1. 2
    5
      vue-theme/src/pages/list.vue

+ 2
- 5
vue-theme/src/pages/list.vue Vedi File

@@ -113,18 +113,16 @@ export default {
113 113
             }
114 114
         },
115 115
         async getPosts() {
116
-            
117 116
             let dispatchAction = `getMore${this.pType}`
118 117
             let params = this._getDispatchParams()
119 118
             
120 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 121
                 dispatchAction = `getAll${this.pType}`
123 122
                 params = this._getDispatchParams(-1)
124
-                this.keepFetching = false
125 123
             }
126 124
 
127
-            const ignore = [`getMoreEpisodes`, 'getMorePages']
125
+            const ignore = ['getMorePages']
128 126
             let res = null
129 127
             if(this.pType && !ignore.includes(dispatchAction) && this.keepFetching) {
130 128
                 res = await this.$store.dispatch(dispatchAction, params)
@@ -157,7 +155,6 @@ export default {
157 155
         },
158 156
         setIntersectionLoader() {
159 157
             if(!this.type) return console.error('cannot setup intersection handler for undefined type')
160
-            
161 158
             console.log('Setting interesection loader...')
162 159
             
163 160
             const footerEl = document.querySelector(INTERSECT_SELECTOR)

Loading…
Annulla
Salva