-
Notifications
You must be signed in to change notification settings - Fork 4k
fix: Tags - App freezes on import tags page when download backup is cancelled. #75374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5ce70cc
82f0bbc
884cd98
dc04e0e
063b65b
f14e908
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ import useOnyx from '@hooks/useOnyx'; | |
| import usePolicy from '@hooks/usePolicy'; | ||
| import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import {close} from '@libs/actions/Modal'; | ||
| import {cleanPolicyTags, downloadMultiLevelTagsCSV, downloadTagsCSV, setImportedSpreadsheetIsImportingMultiLevelTags} from '@libs/actions/Policy/Tag'; | ||
| import {canUseTouchScreen} from '@libs/DeviceCapabilities'; | ||
| import Navigation from '@libs/Navigation/Navigation'; | ||
|
|
@@ -111,13 +112,17 @@ function ImportTagsOptionsPage({route}: ImportTagsOptionsPageProps) { | |
| downloadMultiLevelTagsCSV( | ||
| policyID, | ||
| () => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| close(() => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| }); | ||
| }, | ||
| hasDependentTags, | ||
| ); | ||
| } else { | ||
| downloadTagsCSV(policyID, () => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| close(() => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| }); | ||
| }); | ||
| } | ||
| }} | ||
|
|
@@ -139,13 +144,17 @@ function ImportTagsOptionsPage({route}: ImportTagsOptionsPageProps) { | |
| downloadMultiLevelTagsCSV( | ||
| policyID, | ||
| () => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| close(() => { | ||
| setIsDownloadFailureModalVisible(true); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I thought we only needed to wrap this callback with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're right here, we should only wrap the state update callback for better UX. Thanks for catching that. Updated |
||
| }); | ||
| }, | ||
| hasDependentTags, | ||
| ); | ||
| } else { | ||
| downloadTagsCSV(policyID, () => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| close(() => { | ||
| setIsDownloadFailureModalVisible(true); | ||
| }); | ||
| }); | ||
| } | ||
| }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave a comment here to explain. Thanks 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment added.