Manage HTTP connections based on tab visibility#9202
Manage HTTP connections based on tab visibility#9202Samruddhi90 merged 5 commits intorealtime-backofffrom
Conversation
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
|
Do we plan to add tests for this change? |
Yes we will be adding the unit test cases for everything in the upcoming PR. |
* added the api-definition, interfaces, realtime connection and backoffLogic * Added TODO and comments * resolved the comment about the spacing problem * Fix check failures * Fix yarn failures * Convert backoff time from seconds to minutes * Manage HTTP connections based on tab visibility (#9202) * Added the visibilityMonitor * minor changes * resolving the spacing problem
This PR is a follow-up to #9199.
It introduces the logic for managing connections based on tab visibility. Specifically, it opens or closes a connection when a tab moves to the foreground or background. To achieve this, the existing VisibilityMonitor from the packages/database is being consolidated into a shared utility function in firebase/util. This change allows both the database and remote-config packages to use the same visibility monitoring API.
Future PRs will include the implementation of the AutoFetch logic and corresponding unit tests.