-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Feature/38774 expensify persona #41343
Changes from all commits
e343aa6
9a58f4f
6da74e4
aaa3cd4
282490a
f50eaaa
0410d8f
179575f
9cba84a
ba3aa46
5c2e6d2
36842b8
a6b6593
d858c04
56cd07f
8365690
717fe74
b765fe2
e921c92
eab9f0b
99b7398
0205df8
08a87cd
2015e43
5dc7f6c
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 |
---|---|---|
|
@@ -5,4 +5,6 @@ import type {Account} from '@src/types/onyx'; | |
const isValidateCodeFormSubmitting = (account: OnyxEntry<Account>) => | ||
!!account?.isLoading && account.loadingForm === (account.requiresTwoFactorAuth ? CONST.FORMS.VALIDATE_TFA_CODE_FORM : CONST.FORMS.VALIDATE_CODE_FORM); | ||
|
||
export default {isValidateCodeFormSubmitting}; | ||
const isAccountIDOddNumber = (accountID: number) => accountID % 2 === 1; | ||
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. Can we please move this to the 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. Fair, I think we were not looking at this as a beta, but I can see where you are coming from. @koko57 do you think you could move this around to permissions file? |
||
|
||
export default {isValidateCodeFormSubmitting, isAccountIDOddNumber}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import type PriorityMode from '@src/types/onyx/PriorityMode'; | |
import type Report from '@src/types/onyx/Report'; | ||
import type ReportAction from '@src/types/onyx/ReportAction'; | ||
import type DeepValueOf from '@src/types/utils/DeepValueOf'; | ||
import AccountUtils from './AccountUtils'; | ||
import * as CollectionUtils from './CollectionUtils'; | ||
import {hasValidDraftComment} from './DraftCommentUtils'; | ||
import localeCompare from './LocaleCompare'; | ||
|
@@ -104,6 +105,12 @@ function getOrderedReportIDs( | |
return false; | ||
} | ||
|
||
const participantAccountIDs = Object.keys(report?.participants ?? {}).map(Number); | ||
|
||
if (currentUserAccountID && AccountUtils.isAccountIDOddNumber(currentUserAccountID) && participantAccountIDs.includes(CONST.ACCOUNT_ID.NOTIFICATIONS)) { | ||
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. Hey team, coming from #43782 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. @eVoloshchak Should I fix it or you're going with someone's proposal? 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. @koko57, I'm not entirely sure @twisterdotcom, could you weigh in on this please? 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. @koko57 yes please, lets fix it, its still in the regression period 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. |
||
return true; | ||
} | ||
|
||
return ReportUtils.shouldReportBeInOptionList({ | ||
report, | ||
currentReportId: currentReportId ?? '', | ||
|
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.
NAB - this could be made a bit more generic as
NumberUtils.isOdd(value: number)