@@ -27,11 +27,11 @@ import {
2727} from './api' ;
2828import { getHttpErrorStatus } from '../utils' ;
2929
30- const normalizeNotificationCounts = ( { countByAppName, count, showNotificationTray } ) => {
30+ const normalizeNotificationCounts = ( { countByAppName, count, showNotificationsTray } ) => {
3131 const appIds = Object . keys ( countByAppName ) ;
3232 const apps = appIds . reduce ( ( acc , appId ) => { acc [ appId ] = [ ] ; return acc ; } , { } ) ;
3333 return {
34- countByAppName, appIds, apps, count, showNotificationTray ,
34+ countByAppName, appIds, apps, count, showNotificationsTray ,
3535 } ;
3636} ;
3737
@@ -66,12 +66,7 @@ export const fetchAppsNotificationCount = () => (
6666 dispatch ( fetchNotificationsCountRequest ( ) ) ;
6767 const data = await getNotificationCounts ( ) ;
6868 const normalisedData = normalizeNotificationCounts ( ( camelCaseObject ( data ) ) ) ;
69- dispatch ( fetchNotificationsCountSuccess ( {
70- ...normalisedData ,
71- countByAppName : data . countByAppName ,
72- count : data . count ,
73- showNotificationTray : data . showNotificationTray ,
74- } ) ) ;
69+ dispatch ( fetchNotificationsCountSuccess ( { ...normalisedData } ) ) ;
7570 } catch ( error ) {
7671 if ( getHttpErrorStatus ( error ) === 403 ) {
7772 dispatch ( fetchNotificationsCountDenied ( ) ) ;
0 commit comments