Skip to content

Commit

Permalink
[web] Remove useless getters of the store
Browse files Browse the repository at this point in the history
  • Loading branch information
hacketiwack committed Feb 21, 2024
1 parent bb43de4 commit 3cadee1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion web-src/src/components/LyricsPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default {
}
},
lyrics() {
const raw = this.$store.getters.lyrics
const raw = this.$store.state.lyrics.content
const parsed = []
if (raw) {
// Parse the lyrics
Expand Down
2 changes: 1 addition & 1 deletion web-src/src/components/PlayerButtonLyrics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
computed: {
is_active() {
return this.$store.getters.lyrics_pane
return this.$store.state.lyrics.pane
},
icon_name() {
return this.is_active ? 'script-text-play' : 'script-text-outline'
Expand Down
2 changes: 1 addition & 1 deletion web-src/src/pages/PageNowPlaying.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {
},
lyrics_visible() {
return this.$store.getters.lyrics_pane
return this.$store.state.lyrics.pane
},
player() {
Expand Down
4 changes: 0 additions & 4 deletions web-src/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ export default createStore({
},

getters: {
lyrics: (state) => state.lyrics.content,

lyrics_pane: (state) => state.lyrics.pane,

now_playing: (state) => {
const item = state.queue.items.find((e) => e.id === state.player.item_id)
return item === undefined ? {} : item
Expand Down

0 comments on commit 3cadee1

Please sign in to comment.