[feature] Always show content warning: use existing glitch feature (#1)
The modifications you made are somewhat janky; for instance, editing a toot with an existing content warning makes the UI look very weird and doesn't quite work. Glitch already has a feature for this, so simply turn it on by default. This should do the same thing. Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/1 Co-authored-by: julia <midnight@trainwit.ch> Co-committed-by: julia <midnight@trainwit.ch>
This commit is contained in:
@@ -13,7 +13,7 @@ import { debounce } from 'lodash';
|
||||
import { HotKeys } from 'react-hotkeys';
|
||||
|
||||
import { changeLayout } from 'flavours/glitch/actions/app';
|
||||
import { uploadCompose, resetCompose } from 'flavours/glitch/actions/compose';
|
||||
import { uploadCompose, resetCompose, changeComposeSpoilerness } from 'flavours/glitch/actions/compose';
|
||||
import { clearHeight } from 'flavours/glitch/actions/height_cache';
|
||||
import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers';
|
||||
import { expandNotifications, notificationsSetVisibility } from 'flavours/glitch/actions/notifications';
|
||||
@@ -518,6 +518,11 @@ class UI extends Component {
|
||||
this.props.dispatch(resetCompose());
|
||||
};
|
||||
|
||||
handleHotkeyToggleComposeSpoilers = e => {
|
||||
e.preventDefault();
|
||||
this.props.dispatch(changeComposeSpoilerness());
|
||||
};
|
||||
|
||||
handleHotkeyFocusColumn = e => {
|
||||
const index = (e.key * 1) + 1; // First child is drawer, skip that
|
||||
const column = this.node.querySelector(`.column:nth-child(${index})`);
|
||||
|
||||
Reference in New Issue
Block a user