fix bug where discarding changes would not update the view

This commit is contained in:
marlon-erler
2024-08-19 18:28:02 -07:00
parent 686fa5860f
commit 8a63c6e285
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ export function TaskSettingsModal(taskViewModel: TaskViewModel) {
</div>
</main>
<div class="flex-row width-100">
<button class="flex" on:click={taskViewModel.close}>
<button class="flex" on:click={taskViewModel.closeAndDiscard}>
{translations.general.closeButton}
</button>
<button class="flex primary" on:click={taskViewModel.closeAndSave}>
+5
View File
@@ -90,6 +90,11 @@ export default class TaskViewModel {
this.containingModel.closeTask();
};
closeAndDiscard = (): void => {
this.close();
this.loadTaskData();
}
closeAndSave = (): void => {
this.close();
this.save();