when refreshing model from file, preserve toggle status of low-priority tasks
This commit is contained in:
@@ -32,7 +32,10 @@ class Main extends Sprite
|
|||||||
};
|
};
|
||||||
function reloadModel(_) {
|
function reloadModel(_) {
|
||||||
if (t.draggingSprite == null) {
|
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();
|
t.model.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user