Преглед изворни кода

:bug: tweaking refactor for by-alpha inbetweens

tags/0.9.0
J пре 4 година
родитељ
комит
3ddc601fff

+ 0
- 6
vue-theme/src/pages/list.vue Прегледај датотеку

104
 
104
 
105
             if(shouldClear) {
105
             if(shouldClear) {
106
                 this.$store.commit(`CLEAR_${this.pType.toUpperCase()}`)
106
                 this.$store.commit(`CLEAR_${this.pType.toUpperCase()}`)
107
-                
108
-                // Clear any state needed to track title inbetweens
109
-                const hasInbetweens = ['artist']
110
-                if(hasInbetweens.includes(this.type)) {
111
-                    this.$store.commit(`CLEAR_${this.pType.toUpperCase()}_SEEN`)
112
-                }
113
             }
107
             }
114
 
108
 
115
             try {
109
             try {

+ 5
- 3
vue-theme/src/store/modules/arrangements.js Прегледај датотеку

40
     return flatPacked
40
     return flatPacked
41
 }
41
 }
42
 
42
 
43
+let seenTitles = []
43
 const _arrangeByAlpha = postsList => {
44
 const _arrangeByAlpha = postsList => {
44
     const alphabet = [...'9abcdefghijklmnopqrstuvwxyz']
45
     const alphabet = [...'9abcdefghijklmnopqrstuvwxyz']
45
     const flatPacked = []
46
     const flatPacked = []
46
     
47
     
47
     const storeTitle = letter => {
48
     const storeTitle = letter => {
48
-        if(state.seenTitles.includes(letter)) return
49
+        if(seenTitles.includes(letter)) return
49
         flatPacked.push({ slug: letter, title: letter, inbetween: true })
50
         flatPacked.push({ slug: letter, title: letter, inbetween: true })
50
-        state.seenTitles.push(letter)
51
+        seenTitles.push(letter)
51
     }
52
     }
52
-
53
+    
53
     postsList.forEach(post => {
54
     postsList.forEach(post => {
54
         const lastWord = post.slug.split('-').filter(c => c).pop()
55
         const lastWord = post.slug.split('-').filter(c => c).pop()
55
         const firstCharaOflastWord = lastWord[0]
56
         const firstCharaOflastWord = lastWord[0]
59
         storeTitle(alphabet[charaIndex])
60
         storeTitle(alphabet[charaIndex])
60
         flatPacked.push(post)
61
         flatPacked.push(post)
61
     })
62
     })
63
+    seenTitles = []
62
     return flatPacked
64
     return flatPacked
63
 }
65
 }
64
 
66
 

+ 0
- 1
vue-theme/src/store/modules/artist.js Прегледај датотеку

6
     all: [],
6
     all: [],
7
     loaded: false,
7
     loaded: false,
8
     singleArtist: null,
8
     singleArtist: null,
9
-    seenTitles: []
10
 }
9
 }
11
 
10
 
12
 const getters = {
11
 const getters = {

Loading…
Откажи
Сачувај