-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 Reddot pinned chat appears for approver after failed scanned #39970
Changes from 17 commits
69263a4
fe5f752
1303c69
f082a5a
ec854c5
48ad489
590547f
1be1d08
de0ae91
4d03c16
4560da2
3fbf0f7
8866eb7
83500fc
97ce514
4c35a47
0c68919
6e342bc
4ef770d
728ae68
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 |
---|---|---|
|
@@ -1199,6 +1199,13 @@ function isLinkedTransactionHeld(reportActionID: string, reportID: string): bool | |
return TransactionUtils.isOnHoldByTransactionID(getLinkedTransactionID(reportActionID, reportID) ?? ''); | ||
} | ||
|
||
/** | ||
* Check if the current user is the requestor of the action | ||
*/ | ||
function isRequestor(reportAction: OnyxEntry<ReportAction>): boolean { | ||
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. Sorry I kinda missed this in the proposal and original review, but I was thinking about reports when thinking about How about we call this something like 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 renamed it in commit 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. Cool, let me know when this is ready for re-review. Thanks |
||
return currentUserAccountID === reportAction?.actorAccountID; | ||
} | ||
|
||
export { | ||
extractLinksFromMessageHtml, | ||
getDismissedViolationMessageText, | ||
|
@@ -1264,7 +1271,9 @@ export { | |
isActionableJoinRequest, | ||
isActionableJoinRequestPending, | ||
isActionableTrackExpense, | ||
getAllReportActions, | ||
isLinkedTransactionHeld, | ||
isRequestor, | ||
}; | ||
|
||
export type {LastVisibleMessage}; |
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.
Are we calling
ReportUtils.hasSmartscanError
from anywhere else? Do we need the second param?Even if we need it, I don't think it should be a separate param, and instead we should have that check outside of the
ReportUtils.hasSmartscanError
function, since that function name sounds like it shouldn't care aboutisLHNPreview
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.
No
I think we still need to create a
isLHNPreview
param then handle both case (isLHNPreview
istrue
orfalse
) inhasSmartscanError
to reduce the duplicate logics.As you can see, if we do like this, we just need to create a new variable,
hasMissingField
and apply a minor change toisReportPreviewError
, the rest logic does not change.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.
I think I'm not following or I'm missing something, because if we always pass this as true, this doesn't make sense
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.
That makes sense. I removed
isLHNPreview
in commit