fixed offline messages are grayed out even if online#2526
Conversation
|
I also see that we are attaching a listener for let me know, If i can push these changes as well. |
With stuff like this I think if you can time/benchmark and prove there is a perceptible difference then we should do it. But otherwise we could be making unnecessary optimizations. |
|
Updated. Thanks. |
marcaaron
left a comment
There was a problem hiding this comment.
See additional comment thanks :)
|
TIL: You can toggle online/offline in the browser debugger. |
|
Updated. Thanks. |
marcaaron
left a comment
There was a problem hiding this comment.
Looks better just one more comment about the original implementation here.
| const ReportActionItemMessage = ({action, network}) => { | ||
| // reportActionID is only present when the action is saved onto server. | ||
| const isUnsent = action.loading && !action.reportActionID; | ||
| const isUnsent = network.isOffline && action.loading && !action.reportActionID; |
There was a problem hiding this comment.
I'm not sure we need to check both action.loading and action.reportActionID? What does having a reportActionID even mean?
There was a problem hiding this comment.
Or asked another way are there comments that are "loading" and "have a reportActionID"...? it's unclear how we end up in that situation to me.
There was a problem hiding this comment.
I used this to make a difference from the attachment files. As they are also in loading status until they are uploaded. action.reportActionID is only present when comment is uploaded to backend.
There was a problem hiding this comment.
Yeah, it makes sense. we don't actually need it.
There was a problem hiding this comment.
they are also in loading status until they are uploaded
Ok, yeah I believe there's no difference there. It should be the same whether attachment or not.
|
@marcaaron Updated. Thanks. Sorry for the back and forth. |
|
✋ 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 production in version: 1.0.39-5🚀
|
Please review @marcaaron
Details
Working on the change request here #2432 (comment)
Fixed Issues
Fixes #2432Tests / ### QA Steps
You appear to be Offlineunder the composer.Tested On
Screenshots
video.mp4