Pārlūkot izejas kodu

:recycle: not messing with loading on getMoreArtists for list

tags/0.9.0
J 4 gadus atpakaļ
vecāks
revīzija
c890a27c11

+ 1
- 4
vue-theme/src/pages/list.vue Parādīt failu

87
     },
87
     },
88
     methods: {
88
     methods: {
89
         async loadMorePosts(shouldClear) {
89
         async loadMorePosts(shouldClear) {
90
-            
91
             if(!this.keepFetching) return console.warn('Nothing left to fetch...')
90
             if(!this.keepFetching) return console.warn('Nothing left to fetch...')
92
 
91
 
93
             const getPosts = async  (params, dispatchType) => {
92
             const getPosts = async  (params, dispatchType) => {
94
                 if(!this.type) throw `post type: ${this.type} not found...`
93
                 if(!this.type) throw `post type: ${this.type} not found...`
95
-                
94
+                console.log(`Getting more ${this.type} posts`)
96
                 // We always grab all pages on hero init so no need to do it here
95
                 // We always grab all pages on hero init so no need to do it here
97
                 return this.pType && this.type != 'page' ? await this.$store.dispatch(
96
                 return this.pType && this.type != 'page' ? await this.$store.dispatch(
98
                     `get${dispatchType}${this.pType}`,
97
                     `get${dispatchType}${this.pType}`,
140
             this._clearHero(this.$store)
139
             this._clearHero(this.$store)
141
             try {
140
             try {
142
                 const page = await this.getPage(type)
141
                 const page = await this.getPage(type)
143
-                console.log('---')
144
-                console.log(page)
145
                 // We always set a hero no matter what
142
                 // We always set a hero no matter what
146
                 // Because the hero component will deal
143
                 // Because the hero component will deal
147
                 // with how to render based on hero.url
144
                 // with how to render based on hero.url

+ 0
- 1
vue-theme/src/store/modules/artist.js Parādīt failu

74
         return api.getByType({ type: 'artist', sort: sortType, params, cb: storeFetch })
74
         return api.getByType({ type: 'artist', sort: sortType, params, cb: storeFetch })
75
     },
75
     },
76
     getMoreArtists({ commit }, { sortType, params }) {
76
     getMoreArtists({ commit }, { sortType, params }) {
77
-        commit('ARTISTS_LOADED', false)
78
         const storeFetch = (artists => {
77
         const storeFetch = (artists => {
79
             let repacked = artists
78
             let repacked = artists
80
             if(sortType == sortTypes.alpha) {
79
             if(sortType == sortTypes.alpha) {

Notiek ielāde…
Atcelt
Saglabāt