Kaynağa Gözat

:recycle: swap declaration

tags/0.9.0
J 4 yıl önce
ebeveyn
işleme
66ac07a36e
1 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 7
    5
      vue-theme/src/pages/list.vue

+ 7
- 5
vue-theme/src/pages/list.vue Dosyayı Görüntüle

120
             let dispatchAction = `getMore${this.pType}`
120
             let dispatchAction = `getMore${this.pType}`
121
             let params = this._getDispatchParams()
121
             let params = this._getDispatchParams()
122
 
122
 
123
+            // For material sort we grab EVERYTHING
123
             if(this._getSortBy() == sortTypes.material && this.type == 'artist') {
124
             if(this._getSortBy() == sortTypes.material && this.type == 'artist') {
124
                 dispatchAction = `getAll${this.pType}`
125
                 dispatchAction = `getAll${this.pType}`
125
                 params = this._getDispatchParams(-1)
126
                 params = this._getDispatchParams(-1)
212
             // this.clearAndInitPostList()
213
             // this.clearAndInitPostList()
213
         },
214
         },
214
         $route(to, from) {
215
         $route(to, from) {
215
-            // Always unset and reset the intersection loader
216
-            this.unsetIntersectionLoader()
217
-            if(!toPathInfo.sortBy != sortTypes.material) {
218
-                this.setIntersectionLoader()
219
-            }
220
             console.log('---')
216
             console.log('---')
221
             const toPathInfo = this.routeInfoFromPath(to.fullPath)
217
             const toPathInfo = this.routeInfoFromPath(to.fullPath)
222
             const fromPathInfo = this.routeInfoFromPath(from.fullPath)
218
             const fromPathInfo = this.routeInfoFromPath(from.fullPath)
223
             console.log('to :', toPathInfo)
219
             console.log('to :', toPathInfo)
224
             console.log('from :', fromPathInfo)
220
             console.log('from :', fromPathInfo)
225
             
221
             
222
+            // Always unset and reset the intersection loader
223
+            this.unsetIntersectionLoader()
224
+            if(!toPathInfo.sortBy != sortTypes.material) {
225
+                this.setIntersectionLoader()
226
+            }
227
+            
226
             // Check if we changed sort method
228
             // Check if we changed sort method
227
             // from no sort to sorted
229
             // from no sort to sorted
228
             // or sorted to no sort
230
             // or sorted to no sort

Loading…
İptal
Kaydet