-
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
Improve reconnection callback #8858
Conversation
3ddd99e
to
054bb14
Compare
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.
Very nice changes overall. I did have a couple blockers. Thanks @luacmartins !
return Promise.all([ | ||
PersonalDetails.fetchPersonalDetails(), | ||
Report.fetchAllReports(true, true), | ||
]); |
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.
thought (non-blocking): I was kind of expecting to see all of these inside the Promise.all
. But now wondering whether it matters. Probably the report and personal details are the main things you'd need to "sync".
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.
Those two are the only calls returning promises. Not sure if adding the others will make a difference 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.
Yeah I guess my question could be rephrased as... should these be returning promises and should we wait for them? But not sure it is essential.
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.
Yea, I considered that but defaulted to doing nothing since that's the current behavior.
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.
In the doc, we said all them would return promises. But not totally necessary imo.
Updated! |
src/libs/actions/App.js
Outdated
|
||
if (!UnreadIndicatorUpdater.isListeningForReportChanges()) { | ||
UnreadIndicatorUpdater.listenForReportChanges(); | ||
} |
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.
Sorry, to clarify, I think this was in the correct spot before and does not belong in this function.
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! Thanks!
Updated! |
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.
Nice, thanks for the help here! LGTM
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by @sketchydroide in version: 1.1.57-8 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by @chiragsalian in version: 1.1.57-17 🚀
|
Details
Abstracts data initialization to
getAppData()
and improves reconnect callbacks.cc @marcaaron
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/208280
Tests
priorityMode
preferredLocale
account, loginList, nameValuePairs, expensify_payPalMeAddress, expensify_preferredEmojiSkinTone, expensify_frequentlyUsedEmojis, private_blockedFromConcierge
User_GetBetas
User_IsFromPublicDomain
GetLocalCurrency
GetRequestCountryCode
expensify_freePlanBankAccountID
userWallet
personalDetailsList
chatList
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)QA Steps
Same as in Tests. For mobile, just verify that the app has settings like the
preferredLocale
,priorityMode
and you can see the chat list.Screenshots
Web
web.mov
Mobile Web
mweb.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov