Page MenuHomePhabricator

[lib] Ensure messageStore.threads entry for each message from SQLite
ClosedPublic

Authored by ashoat on Nov 18 2022, 6:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 18, 9:00 AM
Unknown Object (File)
Fri, May 10, 8:56 PM
Unknown Object (File)
Fri, May 10, 9:17 AM
Unknown Object (File)
Apr 17 2024, 3:38 AM
Unknown Object (File)
Apr 17 2024, 3:38 AM
Unknown Object (File)
Apr 17 2024, 3:37 AM
Unknown Object (File)
Apr 17 2024, 3:34 AM
Unknown Object (File)
Mar 28 2024, 12:06 PM
Subscribers
None

Details

Summary

See 2b here. This diff makes sure that if a message is present in SQLite, we have a messageStore.threads entry for its corresponding thread.

Test Plan

Confirm that issue in ENG-2275 no longer repros

Diff Detail

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

Event Timeline

Tested this and it works to prevent crash, but the messages are all still lost since when the SAVE_MESSAGES action gets processed it ends up triggering updateMessageStoreWithLatestThreadInfos with an empty ThreadStore and thus generating a remove_messages_for_threads op to delete messages from SQLite. D5667 is still needed to prevent the SAVE_MESSAGES action from firing, but this change is still a good change.

This revision is now accepted and ready to land.Nov 21 2022, 10:44 AM