Make page title dynamic, better notification handling.

This commit is contained in:
Roger Braun 2017-02-18 20:42:00 +01:00
parent d0281f5341
commit 963a0035e5
4 changed files with 38 additions and 7 deletions

View file

@ -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
})
}
}