diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-16 22:29:05 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-05-16 22:29:05 +0200 |
commit | 4415005de73579110a5bbc31bdd55dc89bf726e1 (patch) | |
tree | ac1b378fdfbe5bd301c60f18a565f303156878fc /app/javascript/mastodon/actions/compose.js | |
parent | b91196f4b73fff91997b8077619ae25b6d04a59e (diff) | |
parent | d25015fc5b6c6b31dcf726b02dd0742475d9d9c8 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/mastodon/features/compose/components/compose_form.js`: Conflict caused because of minor code style change upstream, while glitch-soc has different code for handling variable maximum chars. Ported the change. - `app/serializers/initial_state_serializer.rb`: Conflict because glitch-soc had two extra attributes where upstream added one. Added upstream's attribute.
Diffstat (limited to 'app/javascript/mastodon/actions/compose.js')
-rw-r--r-- | app/javascript/mastodon/actions/compose.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js index f3129f8d9..878011fc0 100644 --- a/app/javascript/mastodon/actions/compose.js +++ b/app/javascript/mastodon/actions/compose.js @@ -45,12 +45,12 @@ export const COMPOSE_TAG_HISTORY_UPDATE = 'COMPOSE_TAG_HISTORY_UPDATE'; export const COMPOSE_MOUNT = 'COMPOSE_MOUNT'; export const COMPOSE_UNMOUNT = 'COMPOSE_UNMOUNT'; -export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE'; -export const COMPOSE_SPOILERNESS_CHANGE = 'COMPOSE_SPOILERNESS_CHANGE'; +export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE'; +export const COMPOSE_SPOILERNESS_CHANGE = 'COMPOSE_SPOILERNESS_CHANGE'; export const COMPOSE_SPOILER_TEXT_CHANGE = 'COMPOSE_SPOILER_TEXT_CHANGE'; -export const COMPOSE_VISIBILITY_CHANGE = 'COMPOSE_VISIBILITY_CHANGE'; -export const COMPOSE_LISTABILITY_CHANGE = 'COMPOSE_LISTABILITY_CHANGE'; -export const COMPOSE_COMPOSING_CHANGE = 'COMPOSE_COMPOSING_CHANGE'; +export const COMPOSE_VISIBILITY_CHANGE = 'COMPOSE_VISIBILITY_CHANGE'; +export const COMPOSE_COMPOSING_CHANGE = 'COMPOSE_COMPOSING_CHANGE'; +export const COMPOSE_LANGUAGE_CHANGE = 'COMPOSE_LANGUAGE_CHANGE'; export const COMPOSE_EMOJI_INSERT = 'COMPOSE_EMOJI_INSERT'; @@ -169,6 +169,7 @@ export function submitCompose(routerHistory) { spoiler_text: getState().getIn(['compose', 'spoiler']) ? getState().getIn(['compose', 'spoiler_text'], '') : '', visibility: getState().getIn(['compose', 'privacy']), poll: getState().getIn(['compose', 'poll'], null), + language: getState().getIn(['compose', 'language']), }, headers: { 'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']), @@ -637,6 +638,11 @@ export function changeComposeSensitivity() { }; }; +export const changeComposeLanguage = language => ({ + type: COMPOSE_LANGUAGE_CHANGE, + language, +}); + export function changeComposeSpoilerness() { return { type: COMPOSE_SPOILERNESS_CHANGE, |