1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-12 02:07:26 +01:00
Pinafore-Web-Client-Frontend/routes/_actions/contentWarnings.js
2018-04-11 22:55:11 -07:00

12 lines
376 B
JavaScript

import { store } from '../_store/store'
export function toggleContentWarningShown (realm) {
let shown = store.getComposeData(realm, 'contentWarningShown')
let contentWarning = store.getComposeData(realm, 'contentWarning')
let newShown = !shown
store.setComposeData(realm, {
contentWarning: newShown ? contentWarning : '',
contentWarningShown: newShown
})
}