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, Jul 6, 3:56 PM
Unknown Object (File)
Sat, Jul 6, 3:55 PM
Unknown Object (File)
Sat, Jul 6, 3:55 PM
Unknown Object (File)
Sat, Jul 6, 3:55 PM
Unknown Object (File)
Fri, Jul 5, 3:51 PM
Unknown Object (File)
Fri, Jul 5, 3:14 PM
Unknown Object (File)
Tue, Jul 2, 6:36 AM
Unknown Object (File)
Tue, Jun 18, 2:22 PM

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