From 963a0035e5e3f35ee790aeb3db64cb8dd32a84a4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 18 Feb 2017 20:42:00 +0100 Subject: Make page title dynamic, better notification handling. --- src/modules/statuses.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/modules/statuses.js') diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 871172b5..0967f77a 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -173,7 +173,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us } const addNotification = ({type, status, action}) => { - state.notifications.push({type, status, action}) + state.notifications.push({type, status, action, seen: false}) } const favoriteStatus = (favorite) => { @@ -276,6 +276,11 @@ export const mutations = { setNsfw (state, { id, nsfw }) { const newStatus = find(state.allStatuses, { id }) newStatus.nsfw = nsfw + }, + markNotificationsAsSeen (state, notifications) { + each(notifications, (notification) => { + notification.seen = true + }) } } -- cgit v1.2.3-70-g09d2