Add Desktop Notifications
This commit is contained in:
committed by
Deluan Quintão
parent
b8d47d1db4
commit
2397a7e464
@@ -3,3 +3,4 @@ export * from './dialogReducer'
|
||||
export * from './playQueue'
|
||||
export * from './albumView'
|
||||
export * from './activityReducer'
|
||||
export * from './settingsReducer'
|
||||
|
||||
@@ -23,6 +23,7 @@ const mapToAudioLists = (item) => {
|
||||
trackId: id,
|
||||
name: item.title,
|
||||
singer: item.artist,
|
||||
album: item.album,
|
||||
albumId: item.albumId,
|
||||
artistId: item.albumArtistId,
|
||||
duration: item.duration,
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { SET_NOTIFICATIONS_STATE } from '../actions'
|
||||
|
||||
const initialState = {
|
||||
notifications: false,
|
||||
}
|
||||
|
||||
export const settingsReducer = (previousState = initialState, payload) => {
|
||||
const { type, data } = payload
|
||||
switch (type) {
|
||||
case SET_NOTIFICATIONS_STATE:
|
||||
return {
|
||||
...previousState,
|
||||
notifications: data
|
||||
}
|
||||
default:
|
||||
return previousState
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user