@@ -27,11 +27,11 @@ import {
27
27
} from './api' ;
28
28
import { getHttpErrorStatus } from '../utils' ;
29
29
30
- const normalizeNotificationCounts = ( { countByAppName, count, showNotificationTray } ) => {
30
+ const normalizeNotificationCounts = ( { countByAppName, count, showNotificationsTray } ) => {
31
31
const appIds = Object . keys ( countByAppName ) ;
32
32
const apps = appIds . reduce ( ( acc , appId ) => { acc [ appId ] = [ ] ; return acc ; } , { } ) ;
33
33
return {
34
- countByAppName, appIds, apps, count, showNotificationTray ,
34
+ countByAppName, appIds, apps, count, showNotificationsTray ,
35
35
} ;
36
36
} ;
37
37
@@ -66,12 +66,7 @@ export const fetchAppsNotificationCount = () => (
66
66
dispatch ( fetchNotificationsCountRequest ( ) ) ;
67
67
const data = await getNotificationCounts ( ) ;
68
68
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 } ) ) ;
75
70
} catch ( error ) {
76
71
if ( getHttpErrorStatus ( error ) === 403 ) {
77
72
dispatch ( fetchNotificationsCountDenied ( ) ) ;
0 commit comments