mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
Use vuex mutation instead of manipulating state directly
This commit is contained in:
@@ -207,6 +207,9 @@ export default createStore({
|
||||
state.notifications.list.splice(index, 1)
|
||||
}
|
||||
},
|
||||
[types.SEARCH_PATH](state, searchPath) {
|
||||
state.search_path = searchPath
|
||||
},
|
||||
[types.ADD_RECENT_SEARCH](state, query) {
|
||||
const index = state.recent_searches.findIndex((elem) => elem === query)
|
||||
if (index >= 0) {
|
||||
|
||||
@@ -17,6 +17,8 @@ export const SPOTIFY_FEATURED_PLAYLISTS = 'SPOTIFY_FEATURED_PLAYLISTS'
|
||||
|
||||
export const ADD_NOTIFICATION = 'ADD_NOTIFICATION'
|
||||
export const DELETE_NOTIFICATION = 'DELETE_NOTIFICATION'
|
||||
|
||||
export const SEARCH_PATH = 'SEARCH_PATH'
|
||||
export const ADD_RECENT_SEARCH = 'ADD_RECENT_SEARCH'
|
||||
|
||||
export const HIDE_SINGLES = 'HIDE_SINGLES'
|
||||
|
||||
Reference in New Issue
Block a user