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 @@ -659,7 +659,7 @@ } if (this.needsDeleteAfterCreation) { this.needsDeleteAfterCreation = false; - this.dispatchDelete(response.entryID); + this.dispatchDelete(response.entryID, this.state.text); response = { ...response, updatesResult: this.patchUpdateInfosForDeletion( @@ -752,7 +752,7 @@ } delete: () => void = () => { - this.dispatchDelete(this.props.entryInfo.id); + this.dispatchDelete(this.props.entryInfo.id, this.props.entryInfo.text); }; onPressEdit: () => void = () => { @@ -763,7 +763,7 @@ } }; - dispatchDelete(serverID: ?string) { + dispatchDelete(serverID: ?string, prevText: string) { if (this.deleted) { return; } else if (this.creating) { @@ -778,7 +778,7 @@ deleteEntryActionTypes, this.props.deleteEntry({ entryID: serverID, - prevText: this.props.entryInfo.text, + prevText, calendarQuery: this.props.calendarQuery(), }), undefined,