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)
Mar 6 2024, 3:32 PM
Unknown Object (File)
Mar 6 2024, 3:32 PM
Unknown Object (File)
Mar 6 2024, 3:21 PM
Unknown Object (File)
Mar 6 2024, 2:58 PM
Unknown Object (File)
Feb 23 2024, 5:42 PM
Unknown Object (File)
Jan 17 2024, 8:51 AM
Unknown Object (File)
Jan 13 2024, 6:55 AM
Unknown Object (File)
Jan 5 2024, 2:23 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