mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-27 08:23:41 +01:00
[Glitch] When sending a toot, ensure a CW is only set if the CW field is visible
Partial port of ccc7fe3e1d
to glitch-soc
It doesn't ensure the field isn't changed, just that it isn't submitted if
the field isn't visible. Ensuring the field isn't changed would require
reworking the “always show CW field” feature.
This commit is contained in:
parent
cbb41e2dad
commit
b6e9b7d1cd
1 changed files with 2 additions and 1 deletions
|
@ -138,7 +138,8 @@ export function submitCompose(routerHistory) {
|
|||
return function (dispatch, getState) {
|
||||
let status = getState().getIn(['compose', 'text'], '');
|
||||
let media = getState().getIn(['compose', 'media_attachments']);
|
||||
let spoilerText = getState().getIn(['compose', 'spoiler_text'], '');
|
||||
const spoilers = getState().getIn(['compose', 'spoiler']) || getState().getIn(['local_settings', 'always_show_spoilers_field']);
|
||||
let spoilerText = spoilers ? getState().getIn(['compose', 'spoiler_text'], '') : '';
|
||||
|
||||
if ((!status || !status.length) && media.size === 0) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue