diff --git a/packages/app/src/__deprecated__/renderer/locales/default/en-US.json b/packages/app/src/__deprecated__/renderer/locales/default/en-US.json index 90a7dd3c31..3a26c56c38 100644 --- a/packages/app/src/__deprecated__/renderer/locales/default/en-US.json +++ b/packages/app/src/__deprecated__/renderer/locales/default/en-US.json @@ -180,7 +180,7 @@ "component.updateDownloadedModalDescription": "Do you want to update app now or during next launch?", "component.updateDownloadedModalMessage": "Update is ready to install", "component.updateDownloadedModalWarning": "Note that update process will require app {osxPlatform, select, false {restart} true {quit}}.\nMake sure you saved all data you're currently working on.", - "component.updateErrorModalDescription": "Please download the latest Mudita Center version from {link}", + "component.updateErrorModalDescription": "Please restart the app or update it manually.", "component.updateErrorModalMessage": "Error", "component.updateForcedModalButton": "Download", "component.updateForcedModalCurrentVersion": "Your current version: v.{version}", diff --git a/packages/app/src/files-manager/actions/abort-pending-upload.action.ts b/packages/app/src/files-manager/actions/abort-pending-upload.action.ts index 8949ee8f5b..210b02139d 100644 --- a/packages/app/src/files-manager/actions/abort-pending-upload.action.ts +++ b/packages/app/src/files-manager/actions/abort-pending-upload.action.ts @@ -15,6 +15,6 @@ export const abortPendingUpload = createAsyncThunk( FilesManagerEvent.AbortPendingUpload, (_, { dispatch }) => { dispatch(setPendingFilesToUpload([])) - dispatch(setUploadingState(State.Loaded)) + dispatch(setUploadingState(State.Initial)) } ) diff --git a/packages/app/src/files-manager/components/files-manager/files-manager.component.tsx b/packages/app/src/files-manager/components/files-manager/files-manager.component.tsx index d384839fc6..3510e16328 100644 --- a/packages/app/src/files-manager/components/files-manager/files-manager.component.tsx +++ b/packages/app/src/files-manager/components/files-manager/files-manager.component.tsx @@ -62,6 +62,7 @@ const FilesManager: FunctionComponent = ({ abortPendingUpload, continuePendingUpload, }) => { + const uploadTimeoutRef = useRef | null>(null) const fileInputRef = useRef(null) const { noFoundFiles, searchValue, filteredFiles, handleSearchValueChange } = useFilesFilter({ files: files ?? [] }) @@ -141,7 +142,12 @@ const FilesManager: FunctionComponent = ({ } else if (uploading === State.Loaded) { updateFieldState("uploading", false) updateFieldState("deletingInfo", false) - updateFieldState("uploadingInfo", true) + if (uploadingFileCount) { + updateFieldState("uploadingInfo", true) + } + } else if (uploading === State.Pending) { + updateFieldState("uploadingInfo", false) + clearTimeout(uploadTimeoutRef.current || undefined) } else if (uploading === State.Failed) { updateFieldState("uploading", false) updateFieldState("uploadingFailed", true) @@ -176,13 +182,13 @@ const FilesManager: FunctionComponent = ({ return } - const hideInfoPopupsTimeout = setTimeout(() => { + uploadTimeoutRef.current = setTimeout(() => { updateFieldState("uploadingInfo", false) resetUploadingStateAfterSuccess() }, 5000) return () => { - clearTimeout(hideInfoPopupsTimeout) + clearTimeout(uploadTimeoutRef.current || undefined) } // AUTO DISABLED - fix me if you like :) // eslint-disable-next-line react-hooks/exhaustive-deps