Skip to content

fix: Make the sync store only update if remote is different than local#1031

Open
Dadadah wants to merge 1 commit intostoatchat:mainfrom
Dadadah:fix/synctime
Open

fix: Make the sync store only update if remote is different than local#1031
Dadadah wants to merge 1 commit intostoatchat:mainfrom
Dadadah:fix/synctime

Conversation

@Dadadah
Copy link
Copy Markdown
Member

@Dadadah Dadadah commented Mar 14, 2026

Adds a deep equal function to Ordering and NotificationOptions stores. The sync store will not attempt to update the server if the incoming data is equal to the existing data.

Closes #1009

This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
@ThomasJRyan ThomasJRyan requested a review from a team March 16, 2026 03:17
Copy link
Copy Markdown
Contributor

@insertish insertish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of writing out our own comparison functions, we just use lodash isEqual?

@Dadadah Dadadah requested a review from a team as a code owner March 21, 2026 16:47
@Dadadah
Copy link
Copy Markdown
Member Author

Dadadah commented Mar 21, 2026

I'm not sure we can use isEqual when using states like this. The state doesn't return a pure object so it won't be equal with the parsed object. Is there a way to get the pure object out of the state?

Edit: Alternatively, should I write a method to get the pure object out of the state for comparison with isEquals?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triggering UserSettingsUpdate event causes infinite loop

4 participants