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 (
@@ -124,6 +124,30 @@ const FILE_UPLOAD_DESCRIPTOR = msg({
message: 'File upload',
comment: 'Settings search synonym. Used to match this term when the user types it in the settings search bar.',
});
const SEQUENTIAL_FILE_SEND_DESCRIPTOR = msg({
message: 'Send file messages in order',
comment: 'Settings search entry label. Names the settings search entry in the settings UI.',
});
const SEQUENTIAL_SEND_DESCRIPTOR = msg({
message: 'Sequential send',
comment: 'Settings search synonym. Used to match this term when the user types it in the settings search bar.',
});
const FILE_ORDERING_DESCRIPTOR = msg({
message: 'File ordering',
comment: 'Settings search synonym. Used to match this term when the user types it in the settings search bar.',
});
const ORDERED_UPLOAD_DESCRIPTOR = msg({
message: 'Ordered upload',
comment: 'Settings search synonym. Used to match this term when the user types it in the settings search bar.',
});
const SERIAL_SEND_DESCRIPTOR = msg({
message: 'Serial send',
comment: 'Settings search synonym. Used to match this term when the user types it in the settings search bar.',
});
const ENSURES_FILES_ARE_SENT_IN_THE_ORDER_THEY_WERE_ADDED_DESCRIPTOR = msg({
message: 'Ensures file messages appear in the order you sent them',
comment: 'Settings search entry description. One-line summary of what the settings search entry controls.',
});
const START_UPLOADING_ATTACHMENTS_WHEN_THEY_ARE_ADDED_DESCRIPTOR = msg({
message: 'Start uploading attachments as soon as they are added to the message input',
comment: 'Settings search entry description. One-line summary of what the settings search entry controls.',
@@ -711,4 +735,20 @@ export const chatSettingsIndex: Array<SearchableSettingDescriptor> = [
audience: 'advanced',
tags: ['chat'],
},
{
id: 'chat-settings-sequential-file-send',
tabType: 'advanced_settings',
sectionId: 'chat',
label: SEQUENTIAL_FILE_SEND_DESCRIPTOR,
keywords: [
SEQUENTIAL_SEND_DESCRIPTOR,
FILE_ORDERING_DESCRIPTOR,
ORDERED_UPLOAD_DESCRIPTOR,
SERIAL_SEND_DESCRIPTOR,
FILE_UPLOAD_DESCRIPTOR,
],
description: ENSURES_FILES_ARE_SENT_IN_THE_ORDER_THEY_WERE_ADDED_DESCRIPTOR,
audience: 'advanced',
tags: ['chat'],
},
];