when refreshing model from file, preserve toggle status of low-priority tasks

This commit is contained in:
2022-09-18 19:26:21 +00:00
parent b78508c163
commit 5fe68c428c

View File

@@ -32,7 +32,10 @@ class Main extends Sprite
};
function reloadModel(_) {
if (t.draggingSprite == null) {
t.refreshModel(new HabitModel(habitFile));
var showLowerPriority = t.model.showLowerPriority;
var newModel = new HabitModel(habitFile);
newModel.showLowerPriority = showLowerPriority;
t.refreshModel(newModel);
t.model.save();
}
}