Skip to content

Commit

Permalink
Correctly merged dev-branch Main with PR Main
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoy committed Dec 2, 2024
1 parent ceb3088 commit 5dd2f0f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/haz3lweb/Main.re
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,27 @@ let apply = (model, action, ~schedule_action, ~schedule_autosave): Model.t => {
| (UpdateAction.PerformAction(Move(_)), true) => model
| (action, _) =>
if (UpdateAction.is_edit(action)) {
last_edit_action := JsUtil.timestamp();
edit_action_applied := true;
schedule_autosave(
BonsaiUtil.Alarm.Action.SetAlarm(
Core.Time_ns.add(
Core.Time_ns.now(),
Core.Time_ns.Span.of_sec(1.0),
),
),
);
} else {
schedule_autosave(
BonsaiUtil.Alarm.Action.SnoozeAlarm(
Core.Time_ns.add(
Core.Time_ns.now(),
Core.Time_ns.Span.of_sec(1.0),
),
),
);
};
if (Update.should_scroll_to_caret(action)) {
scroll_to_caret := true;
};
last_edit_action := JsUtil.timestamp();
switch (
try({
let new_model = Update.apply(model, action, ~schedule_action);
Expand Down

0 comments on commit 5dd2f0f

Please sign in to comment.