Skip to content

Codepush update prompt #4578

Manish requested to merge js/4578-codepush-update-prompt into master

Summary of Changes

  • syncs codepush when newsfeed tab is focused and will start downloading the update in the background
  • shows an update prompt if any update were available when newsfeed is refreshed or rendered for the first time

Note: this functionality only works if a codepush is already installed, it will not check for updates if no codepush is already applied

Note 2: this functionality does not handle the scenario when an update is available but it has incompatible appVersion. That case will be handled as if no updates were available

Note 3: this does not differentiate between mandatory and normal updates. Both show the same prompt

Testing Considerations

  • download the app
  • go to devtools and make sure you're on deployment X
  • go back to newsfeed
  • release a new version for deployment X
  • switch to another tab and back to newsfeed (or refresh newsfeed)
  • wait for sometime so that update is downloaded
  • refresh the newsfeed
  • you should see the update prompt
  • press restart and the app should restart
  • go to devtools and make sure you're on a newer version of deployment X

Note: make sure switching deployments works ok with this functionality

Regression Scope

codepush

Platform Affected (web, mobile, etc)

All

Developer Testing Completed

local

Screenshots

Screenshot_2022-12-02_at_12.07.54

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode
Edited by Manish

Merge request reports