feat: binded show notification tray status with the backend api
This commit is contained in:
@@ -27,11 +27,11 @@ import {
|
||||
} from './api';
|
||||
import { getHttpErrorStatus } from '../utils';
|
||||
|
||||
const normalizeNotificationCounts = ({ countByAppName, count, showNotificationTray }) => {
|
||||
const normalizeNotificationCounts = ({ countByAppName, count, showNotificationsTray }) => {
|
||||
const appIds = Object.keys(countByAppName);
|
||||
const apps = appIds.reduce((acc, appId) => { acc[appId] = []; return acc; }, {});
|
||||
return {
|
||||
countByAppName, appIds, apps, count, showNotificationTray,
|
||||
countByAppName, appIds, apps, count, showNotificationsTray,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ export const fetchAppsNotificationCount = () => (
|
||||
...normalisedData,
|
||||
countByAppName: data.countByAppName,
|
||||
count: data.count,
|
||||
showNotificationTray: data.showNotificationTray,
|
||||
showNotificationsTray: data.showNotificationsTray,
|
||||
}));
|
||||
} catch (error) {
|
||||
if (getHttpErrorStatus(error) === 403) {
|
||||
|
||||
Reference in New Issue
Block a user