Fix blank preview when opened URL of deleted file#42680
Fix blank preview when opened URL of deleted file#42680bondydaa merged 2 commits intoExpensify:mainfrom
Conversation
| if (isEqual(attachments, attachmentsFromReport)) { | ||
| if (attachments.length === 0) { | ||
| setPage(-1); | ||
| } | ||
| return; |
There was a problem hiding this comment.
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.
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.
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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