HomePhabricator
Diffusion Comm 8764f64de867

[native] Use just one storeLoaded variable for SQLiteContext

Description

[native] Use just one storeLoaded variable for SQLiteContext

Summary:
@marcinwasowicz noticed an issue where threadStoreLoaded was getting set to true before messageStoreLoaded, despite the two set calls being right next to each other.

It seems like React is calling the effect twice... first with just threadStoreLoaded set to true, and then with both set to true.

The result of this is that the effect is being run twice instead of once. This diff should make it so it only gets called once.

Test Plan: @marcinwasowicz, can you help test this?

Reviewers: marcinwasowicz, palys-swm, atul

Reviewed By: marcinwasowicz

Subscribers: Adrian, yayabosh, marcinwasowicz

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

Details

Provenance
ashoatAuthored on Jul 13 2022, 7:59 AM
Reviewer
marcin
Differential Revision
D4517: [native] Use just one storeLoaded variable for SQLiteContext
Parents
rCOMM39c0e7fb4bce: [services] Tunnelbroker - Add Corrosion to CMakeLists
Branches
Unknown
Tags
Unknown