semaphore/routes/_actions/contentWarnings.js

12 lines
376 B
JavaScript
Raw Normal View History

2018-03-03 23:44:43 +00:00
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
})
2018-03-03 23:44:43 +00:00
}