Page MenuHomePhabricator

D12262.id40876.diff
No OneTemporary

D12262.id40876.diff

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

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)

Event Timeline