-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix blank preview when opened URL of deleted file #42680
Fix blank preview when opened URL of deleted file #42680
Conversation
if (isEqual(attachments, attachmentsFromReport)) { | ||
if (attachments.length === 0) { | ||
setPage(-1); | ||
} | ||
return; |
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.
We need to make a little refactor here as we also need to call setDownloadButtonVisibility
to hide the download button.
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.
Actually it may be better to remove this early return and remove the unnecessary dependencies same as in index.native.ts
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.
we also need to call setDownloadButtonVisibility to hide the download button.
Oh, I didn't notice this one. Updated.
Actually it may be better to remove this early return and remove the unnecessary dependencies same as in index.native.ts
I thought about this one before too, but it was added in the video player PR #30829. I can't find a discussion for that though, so not sure if it's safe to change the deps.
Reviewer Checklist
Screenshots/VideosAndroid: mWeb ChromeNetworking issue iOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.4.77-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
Details
When we open an invalid attachment on a chat that doesn't have any attachment, a blank view is shown instead of not found view.
Fixed Issues
$ #42438
PROPOSAL: #42438 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-05-28.at.15.21.01.mov
Android: mWeb Chrome
Screen.Recording.2024-05-28.at.14.02.42.mov
iOS: Native
Screen.Recording.2024-05-28.at.13.57.19.mov
iOS: mWeb Safari
Screen.Recording.2024-05-28.at.13.59.18.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-28.at.13.57.42.mov
MacOS: Desktop
Screen.Recording.2024-05-28.at.14.01.47.mov