Page MenuHomePhabricator

[lib][native] remove code duplication from `processDBStoreOperations`
ClosedPublic

Authored by kamil on Aug 19 2024, 5:39 AM.
Tags
None
Referenced Files
F2842358: D13107.id43450.diff
Sun, Sep 29, 1:29 PM
F2842325: D13107.id43496.diff
Sun, Sep 29, 1:22 PM
F2841967: D13107.diff
Sun, Sep 29, 11:28 AM
Unknown Object (File)
Wed, Sep 25, 1:30 AM
Unknown Object (File)
Wed, Sep 25, 1:30 AM
Unknown Object (File)
Wed, Sep 25, 12:26 AM
Unknown Object (File)
Thu, Sep 12, 2:20 AM
Unknown Object (File)
Wed, Sep 11, 9:26 AM
Subscribers

Details

Summary

Cleaning this tp reduce code duplication and simplify logic

Test Plan

Play with app and make sure ops are processed and results are persisted.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Aug 19 2024, 6:08 AM
tomek added inline comments.
web/database/sqlite-api.js
199 ↗(On Diff #43450)

We were checking the drafts differently from the other ops. Are you sure the new logic is equivalent?

This revision is now accepted and ready to land.Aug 20 2024, 1:39 AM
web/database/sqlite-api.js
199 ↗(On Diff #43450)

Yes, this line is different because drafts are not converted and can be nullable.

In the new code, this condition is inverted, we check if there is any field that exists and has a length higher than 0 so this should remain unchanged.