feat(app): toggle for sequential msg file send order (#1245)

Co-authored-by: Hampus <[email protected]>
This commit is contained in:
MizarcandHampus authored and GitHub committed 2026-07-02 03:35:03 +02:00
1 parent 33d05f9763
commit de56e3fd81
7 files changed
+150 -3

No files matched your search

@@ -26,6 +26,7 @@ import {
SaveGifFavoritesControl,
ScrollToBottomOnSendControl,
SearchEnginesControl,
SequentialFileSendControl,
SkipMarkAllAsReadControl,
StripTrackingControl,
TranslatorsControl,
@@ -76,6 +77,7 @@ export const DIRECT_CONTROL_ITEM_IDS = new Set([
'chat-settings-input-buttons',
'chat-settings-convert-emoticons',
'chat-settings-preupload-attachments',
'chat-settings-sequential-file-send',
'chat-settings-scroll-to-bottom-on-send',
'chat-settings-skip-mark-all-as-read-confirmation',
'chat-settings-hide-muted-channels',
@@ -115,6 +117,7 @@ export const COMPACT_SWITCH_CONTROL_ITEM_IDS = new Set([
'chat-settings-trust-domains',
'chat-settings-convert-emoticons',
'chat-settings-preupload-attachments',
'chat-settings-sequential-file-send',
'chat-settings-scroll-to-bottom-on-send',
'chat-settings-skip-mark-all-as-read-confirmation',
'chat-settings-hide-muted-channels',
@@ -240,6 +243,10 @@ export const AdvancedSettingControl = observer(({item}: {item: SearchableSetting
return (
<PreuploadMessageAttachmentsControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.preupload-message-attachments-control" />
);
case 'chat-settings-sequential-file-send':
return (
<SequentialFileSendControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.sequential-file-send-control" />
);
case 'chat-settings-scroll-to-bottom-on-send':
return (
<ScrollToBottomOnSendControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.scroll-to-bottom-on-send-control" />
@@ -109,6 +109,10 @@ const UPLOAD_ATTACHMENTS_BEFORE_SENDING_DESCRIPTOR = msg({
message: 'Upload attachments before sending',
comment: 'Short label for an advanced message input privacy preference.',
});
const SEND_FILES_IN_SEQUENTIAL_ORDER_DESCRIPTOR = msg({
message: 'Send file messages in order',
comment: 'Short label for an advanced message input preference.',
});
const SHOW_STICKERS_BUTTON_DESCRIPTOR = msg({
message: 'Show stickers button',
comment: 'Short label for an advanced message input preference.',
@@ -579,6 +583,19 @@ export const PreuploadMessageAttachmentsControl = observer(() => {
);
});
export const SequentialFileSendControl = observer(() => {
const {i18n} = useLingui();
return (
<Switch
ariaLabel={i18n._(SEND_FILES_IN_SEQUENTIAL_ORDER_DESCRIPTOR)}
value={Accessibility.sequentialFileSend}
onChange={(value) => AccessibilityCommands.update({sequentialFileSend: value})}
compact
data-flx="user.advanced-settings-tab.switch.sequential-file-send"
/>
);
});
export const ScrollToBottomOnSendControl = observer(() => {
const {i18n} = useLingui();
return (