mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
fix(scheduler): removes proposals from metadata when removing event
Also add <tbody> tags
This commit is contained in:
parent
5140cf5f07
commit
5311ab6b34
2 changed files with 9 additions and 18 deletions
|
@ -118,18 +118,6 @@ and an event on a draft at the same time!`);
|
|||
}
|
||||
}
|
||||
|
||||
_removeDraftEvent() {
|
||||
this._session.changes.add({events: []});
|
||||
return this._session.changes.commit();
|
||||
}
|
||||
|
||||
_removePendingEvent() {
|
||||
const draft = this._session.draft()
|
||||
const metadata = draft.metadataForPluginId(PLUGIN_ID);
|
||||
delete metadata.pendingEvent
|
||||
Actions.setMetadata(draft, PLUGIN_ID, metadata);
|
||||
}
|
||||
|
||||
_onEventChange = (newData) => {
|
||||
const eventType = this._eventType(this._session.draft());
|
||||
if (eventType === MEETING_REQUEST) {
|
||||
|
@ -140,11 +128,14 @@ and an event on a draft at the same time!`);
|
|||
}
|
||||
|
||||
_onEventRemove = () => {
|
||||
const eventType = this._eventType(this._session.draft());
|
||||
if (eventType === MEETING_REQUEST) {
|
||||
this._removeDraftEvent()
|
||||
} else if (eventType === PENDING_EVENT) {
|
||||
this._removePendingEvent()
|
||||
this._session.changes.add({events: []});
|
||||
this._session.changes.commit();
|
||||
const draft = this._session.draft()
|
||||
const metadata = draft.metadataForPluginId(PLUGIN_ID);
|
||||
if (metadata) {
|
||||
delete metadata.pendingEvent
|
||||
delete metadata.proposals
|
||||
Actions.setMetadata(draft, PLUGIN_ID, metadata);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ export default class ProposedTimeList extends React.Component {
|
|||
)
|
||||
}
|
||||
|
||||
return <table style={this._sProposalTable()}>{trs}</table>
|
||||
return <table style={this._sProposalTable()}><tbody>{trs}</tbody></table>
|
||||
}
|
||||
|
||||
_renderProposalTimeText(proposal) {
|
||||
|
|
Loading…
Reference in a new issue