Page MenuHomePhabricator

[lib] Pass isSocketConnected instead of connectionStatus to callServerEndpoint
ClosedPublic

Authored by ashoat on Dec 27 2023, 6:35 AM.
Tags
None
Referenced Files
F3495932: D10464.id.diff
Thu, Dec 19, 10:36 AM
Unknown Object (File)
Thu, Dec 19, 8:01 AM
Unknown Object (File)
Thu, Dec 19, 1:53 AM
Unknown Object (File)
Mon, Dec 2, 1:54 PM
Unknown Object (File)
Thu, Nov 28, 7:43 AM
Unknown Object (File)
Nov 6 2024, 9:00 AM
Unknown Object (File)
Oct 17 2024, 2:35 PM
Unknown Object (File)
Oct 17 2024, 2:34 PM
Subscribers

Details

Summary

When connectionStatus cycles between disconnected and connecting, it causes callServerEndpoint to get regenerated, which results in every single action being regenerated as well.

However, in callServerEndpoint we actually only care if connectionStatus is connected or not. We can avoid all of these actions being regenerated by passing in some more specific information to callServerEndpoint.

This gets us closer to resolving ENG-3612. Some more details in this Linear comment.

However, this only solves the issue for the old-style useServerCall. useKeyserverCall is still broken because it has a harder task of caching the whole list of KeyserverInfos. The following diffs will resolve that.

Test Plan

Before this stack, I was able to reproduce ENG-3612 by going to the ThreadSettings screen in native while my local keyserver was down. After this stack, the issue no longer repros.

I also compiled a release build of the iOS app to my phone to confirm that there were no regressions in TTI, or the time it takes to open a MessageList and go back to the ChatThreadList.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable