diff options
| author | Roger Braun <roger@rogerbraun.net> | 2017-02-18 20:42:00 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2017-02-18 20:44:41 +0100 |
| commit | 963a0035e5e3f35ee790aeb3db64cb8dd32a84a4 (patch) | |
| tree | 2dd04b4059601097db21ebb79ad753456cfcb3d6 /src/modules/statuses.js | |
| parent | d0281f5341a6fa97983beca158c051ddca66d6a1 (diff) | |
Make page title dynamic, better notification handling.
Diffstat (limited to 'src/modules/statuses.js')
| -rw-r--r-- | src/modules/statuses.js | 7 |
1 files changed, 6 insertions, 1 deletions
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 + }) } } |
