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
Unknown Object (File)
Wed, Nov 6, 9:00 AM
Unknown Object (File)
Oct 17 2024, 2:35 PM
Unknown Object (File)
Oct 17 2024, 2:34 PM
Unknown Object (File)
Oct 17 2024, 2:34 PM
Unknown Object (File)
Oct 17 2024, 2:34 PM
Unknown Object (File)
Oct 4 2024, 2:58 PM
Unknown Object (File)
Sep 6 2024, 5:44 AM
Unknown Object (File)
Sep 6 2024, 5:44 AM
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
No Lint Coverage
Unit
No Test Coverage