-
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
Add closed report action optimistically when workspace is closed #14343
Changes from all commits
55cbf0f
a84aab4
742e4e7
54f1706
a0bc604
f1ff02d
3574093
93199c4
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 |
---|---|---|
|
@@ -175,7 +175,7 @@ class ReportActionsList extends React.Component { | |
// Make sure the oldest report action loaded is not the first. This is so we do not show the | ||
// skeleton view above the created action in a newly generated optimistic chat or one with not | ||
// that many comments. | ||
const lastReportAction = _.last(this.props.sortedReportActions); | ||
const lastReportAction = _.last(this.props.sortedReportActions) || {}; | ||
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. This change is fixing a different bug I discovered when working on this PR. When the workspace has been deleted, navigating to the archived chats threw error, because the |
||
if (this.props.report.isLoadingReportActions && lastReportAction.sequenceNumber > 0) { | ||
return ( | ||
<ReportActionsSkeletonView | ||
|
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.
@mountiny Can you explain why we need to use
created
here.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.
as any report action, this indicated when the action took place, ie when the chat was archived