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 @@ -657,7 +657,7 @@ } if (this.needsDeleteAfterCreation) { this.needsDeleteAfterCreation = false; - this.dispatchDelete(response.entryID); + this.dispatchDelete(response.entryID, this.state.text); } return response; } catch (e) { @@ -717,7 +717,7 @@ } delete: () => void = () => { - this.dispatchDelete(this.props.entryInfo.id); + this.dispatchDelete(this.props.entryInfo.id, this.props.entryInfo.text); }; onPressEdit: () => void = () => { @@ -728,7 +728,7 @@ } }; - dispatchDelete(serverID: ?string) { + dispatchDelete(serverID: ?string, prevText: string) { if (this.deleted) { return; } else if (this.creating) { @@ -743,7 +743,7 @@ deleteEntryActionTypes, this.props.deleteEntry({ entryID: serverID, - prevText: this.props.entryInfo.text, + prevText, calendarQuery: this.props.calendarQuery(), }), undefined,