This differential implements draft store processing functionality in CommCoreModule to enable bulk drafts dump to SQLite.
Details
Make sure eslint and flow do not point errors.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Looks good!
Easy to review as it closely follows the conventions from processThreadStoreOperations(...) and processMessageStoreOperations(...)
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
357 ↗ | (On Diff #18473) | Personally prefer being explicit in the lambda capture list, but don't think we ever determined any "team convention" so totally up to you |
373 ↗ | (On Diff #18473) | Same thing where I'd personally prefer being explicit about the lambda capture list, but up to you |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
373 ↗ | (On Diff #18473) | Here and above I was following the code for processMessageStoreOperations and processThreadStoreOperations where lambda captures are also as simple as this. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
317–318 ↗ | (On Diff #18473) | It's a really bad practice to use #define constants (in ancient times this was the solution, but now it's ok to use const). The most important drawback of using #define is that the name will disappear and during the runtime (e.g. debugging) there's only the value. So you won't see MOVE_DRAFT_OPERATION when debugging, it will be just "move" and that will make this process a lot harder. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
317–318 ↗ | (On Diff #18473) | Sure. I will also replace #define with constants for MessageStore and ThreadStore operations. |