Page MenuHomePhabricator

[native] Use just one storeLoaded variable for SQLiteContext
ClosedPublic

Authored by ashoat on Jul 13 2022, 8:01 AM.
Tags
None
Referenced Files
F2912484: D4517.diff
Mon, Oct 7, 2:47 AM
Unknown Object (File)
Wed, Sep 25, 2:20 AM
Unknown Object (File)
Wed, Sep 25, 2:20 AM
Unknown Object (File)
Wed, Sep 25, 2:15 AM
Unknown Object (File)
Wed, Sep 25, 12:47 AM
Unknown Object (File)
Sat, Sep 7, 4:15 PM
Unknown Object (File)
Sep 5 2024, 6:19 AM
Unknown Object (File)
Sep 1 2024, 1:56 AM

Details

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?

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/storeLoaded
Lint
No Lint Coverage
Unit
No Test Coverage