HomePhabricator
Diffusion Comm 141126a60164

[lib] Separate out bindKeyserverCall cache for each useKeyserverCall callsite

Description

[lib] Separate out bindKeyserverCall cache for each useKeyserverCall callsite

Summary:
The previous diff has one shortcoming, which is mentioned there:

However, we still have an issue owing to the fact that the useDerivedObject will cache on a per-hook-invocation level, whereas bindCallKeyserverEndpointSelector is caching globally.

This diff resolves that by lifting the bindCallKeyserverEndpointSelector cache to also be on a per-hook level.

We can't make the cache global because the individual hook calls can have their params overriden.

Depends on D10465

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.

Reviewers: inka, rohan

Reviewed By: inka

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D10466