Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3355839
D12262.id40876.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
D12262.id40876.diff
View Options
diff --git a/native/calendar/entry.react.js b/native/calendar/entry.react.js
--- a/native/calendar/entry.react.js
+++ b/native/calendar/entry.react.js
@@ -731,29 +731,25 @@
dispatchDelete(serverID: ?string) {
if (this.deleted) {
return;
+ } else if (this.creating) {
+ this.needsDeleteAfterCreation = true;
+ return;
}
this.deleted = true;
LayoutAnimation.easeInEaseOut();
const { localID } = this.props.entryInfo;
- void this.props.dispatchActionPromise(
- deleteEntryActionTypes,
- this.deleteAction(serverID),
- undefined,
- { localID, serverID },
- );
- }
-
- async deleteAction(serverID: ?string): Promise<?DeleteEntryResult> {
if (serverID) {
- return await this.props.deleteEntry({
- entryID: serverID,
- prevText: this.props.entryInfo.text,
- calendarQuery: this.props.calendarQuery(),
- });
- } else if (this.creating) {
- this.needsDeleteAfterCreation = true;
+ void this.props.dispatchActionPromise(
+ deleteEntryActionTypes,
+ this.props.deleteEntry({
+ entryID: serverID,
+ prevText: this.props.entryInfo.text,
+ calendarQuery: this.props.calendarQuery(),
+ }),
+ undefined,
+ { localID, serverID },
+ );
}
- return null;
}
onPressThreadName: () => void = () => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 3:48 PM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576024
Default Alt Text
D12262.id40876.diff (1 KB)
Attached To
Mode
D12262: [native] Clean up Entry delete action
Attached
Detach File
Event Timeline
Log In to Comment