Sfoglia il codice sorgente

:recycle: just checking for sort and clear

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

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

@@ -89,15 +89,16 @@ export default {
89 89
             let dispatchAction = `getAll${this.pType}`
90 90
 
91 91
             let res = null
92
-            if(clear) {
92
+            
93
+            if(['event', 'exhibition'].includes(this.type)) {
93 94
                 dispatchParams.sortType = sortTypes.currentAndUpcoming
94
-                res = await this.$store.dispatch(dispatchAction, dispatchParams)
95 95
             }
96 96
             // Add to existing except episodes
97
-            else if (this.type != 'episode') {
97
+            else if (!clear) {
98 98
                 dispatchAction = `getMore${this.pType}`
99
-                res = await this.$store.dispatch(dispatchAction, dispatchParams)
100 99
             }
100
+
101
+            res = await this.$store.dispatch(dispatchAction, dispatchParams)
101 102
             
102 103
             if(!res.length) {
103 104
                 console.warn('nothing left to get...')

Loading…
Annulla
Salva