HomePhabricator
Diffusion Comm 996585de17bd

[lib] Update `threadStore` with `threadStoreOps` for logOut.

Description

[lib] Update threadStore with threadStoreOps for logOut.success/deleteAccount.success/setNewSession actions

Summary:
Copied from D4185:

Previously we were directly updating the threadStore object with the necessary changes for each action... and also constructing a corresponding list of ops that were used for modifying the SQLite store (on native).

We've had an assertThreadStoreThreadsAreEqual check for each action to verify that the threadStore being constructed "directly" and via the "ops approach" were equivalent. At this point we're pretty confident that they are, and so can safely remove some of the redundant code.

In this diff we remove the assertThreadStoreThreadsAreEqual and return the "processed" threadStore as the "updated" threadStore.


Depends on D4185

Test Plan: Hopefully the months of having assertThreadStoreThreadsAreEqual check in are sufficient.

Reviewers: def-au1t, palys-swm

Reviewed By: palys-swm

Subscribers: ashoat, Adrian, yayabosh

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