diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index b6c6c90e1..21796b262 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -8,6 +8,7 @@ import { UserUtils } from '../../session/utils'; import { syncConfigurationIfNeeded } from '../../session/utils/syncUtils'; import { DAYS, MINUTES } from '../../session/utils/Number'; import { + createOrUpdateItem, generateAttachmentKeyIfEmpty, getItemById, hasSyncedInitialConfigurationItem, @@ -44,6 +45,20 @@ export enum SectionType { Moon, } +const showUnstableAttachmentsDialogIfNeeded = async () => { + const alreadyShown = (await getItemById('showUnstableAttachmentsDialog'))?.value; + + if (!alreadyShown) { + window.confirmationDialog({ + title: 'File server update', + message: + "We're upgrading the way files are stored. File transfer may be unstable for the next 24-48 hours.", + }); + + await createOrUpdateItem({ id: 'showUnstableAttachmentsDialog', value: true }); + } +}; + const Section = (props: { type: SectionType; avatarPath?: string }) => { const ourNumber = useSelector(getOurNumber); const unreadMessageCount = useSelector(getUnreadMessageCount); @@ -157,6 +172,7 @@ const doAppStartUp = (dispatch: Dispatch) => { void OnionPaths.getInstance().buildNewOnionPaths(); } + void showUnstableAttachmentsDialogIfNeeded(); // init the messageQueue. In the constructor, we add all not send messages // this call does nothing except calling the constructor, which will continue sending message in the pipeline void getMessageQueue().processAllPending();