mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-08 17:17:56 +08:00
fix(scheduler): End should work even if the mouse isn't over a time
This commit is contained in:
parent
938e9b8093
commit
5f75cccc0f
2 changed files with 6 additions and 4 deletions
|
@ -122,8 +122,11 @@ export default class ProposedTimePicker extends React.Component {
|
|||
}
|
||||
|
||||
_onCalendarMouseUp({time, currentView}) {
|
||||
if (!time || currentView !== NylasCalendar.WEEK_VIEW) { return }
|
||||
SchedulerActions.endProposedTimeBlock(time);
|
||||
if (currentView !== NylasCalendar.WEEK_VIEW) { return }
|
||||
if (time) {
|
||||
SchedulerActions.addToProposedTimeBlock(time);
|
||||
}
|
||||
SchedulerActions.endProposedTimeBlock();
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -137,8 +137,7 @@ class ProposedTimeCalendarStore extends NylasStore {
|
|||
this._updateDragBuffer(newT.round(30, 'minutes'));
|
||||
}
|
||||
|
||||
_onEndBlock = (newT) => {
|
||||
this._updateDragBuffer(newT.ceil(30, 'minutes'));
|
||||
_onEndBlock = () => {
|
||||
this._convertBufferToProposedTimes()
|
||||
this._resetDragBuffer();
|
||||
this.trigger()
|
||||
|
|
Loading…
Reference in a new issue