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
Unknown Object (File)
Sat, Nov 2, 10:33 AM
Unknown Object (File)
Oct 25 2024, 6:51 AM
Unknown Object (File)
Oct 7 2024, 2:15 PM
Unknown Object (File)
Oct 7 2024, 2:15 PM
Unknown Object (File)
Oct 7 2024, 2:14 PM
Unknown Object (File)
Oct 7 2024, 2:11 PM
Unknown Object (File)
Oct 7 2024, 5:31 AM
Unknown Object (File)
Oct 7 2024, 4:25 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable