Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3381003
D5731.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5731.diff
View Options
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -330,6 +330,12 @@
for (auto idx = 0; idx < operations.size(rt); idx++) {
auto op = operations.getValueAtIndex(rt, idx).asObject(rt);
auto op_type = op.getProperty(rt, "type").asString(rt).utf8(rt);
+
+ if (op_type == REMOVE_ALL_DRAFTS_OPERATION) {
+ draftStoreOps.push_back(std::make_unique<RemoveAllDraftsOperation>());
+ continue;
+ }
+
auto payload_obj = op.getProperty(rt, "payload").asObject(rt);
if (op_type == UPDATE_DRAFT_OPERATION) {
draftStoreOps.push_back(
@@ -337,8 +343,6 @@
} else if (op_type == MOVE_DRAFT_OPERATION) {
draftStoreOps.push_back(
std::make_unique<MoveDraftOperation>(rt, payload_obj));
- } else if (op_type == REMOVE_ALL_DRAFTS_OPERATION) {
- draftStoreOps.push_back(std::make_unique<RemoveAllDraftsOperation>());
} else {
throw std::runtime_error("unsupported operation: " + op_type);
}
@@ -387,7 +391,8 @@
}
});
};
- GlobalDBSingleton::instance.scheduleOrRunCancellable(job);
+ GlobalDBSingleton::instance.scheduleOrRunCancellable(
+ job, promise, this->jsInvoker_);
});
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 3:36 AM (21 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595615
Default Alt Text
D5731.diff (1 KB)
Attached To
Mode
D5731: Fix draft store operations
Attached
Detach File
Event Timeline
Log In to Comment