fixed view not updating on reuse bug and undo/redo not working properly

This commit is contained in:
poanse 2026-04-25 06:43:53 +03:00
parent 2aeed7bd70
commit eb37754462
5 changed files with 8 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"id": "taskmap",
"name": "Taskmap",
"version": "0.1.2",
"version": "0.1.3",
"minAppVersion": "1.12.4",
"description": "Plan projects via interactive GUI task trees with automatic layout.",
"author": "poanse",

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "obsidian-taskmap",
"version": "0.1.2",
"version": "0.1.3",
"lockfileVersion": 3,
"requires": true,
"packages": {

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-taskmap",
"version": "0.1.2",
"version": "0.1.3",
"description": "Taskmap plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {

View file

@ -45,7 +45,7 @@ export class TaskmapView extends TextFileView {
async onLoadFile(file: TFile): Promise<void> {
this.file = file;
const data = await this.app.vault.read(file);
this.setViewData(data);
this.setViewData(data, true);
this.projectData = deserializeProjectData(data);
this.context = new Context(
this.app,

View file

@ -38,8 +38,12 @@
if (iconCode == SettingsIconCode.SETTINGS_UNDO) {
context.versionedData.undo();
context.save();
context.updateTaskPositions();
} else if (iconCode == SettingsIconCode.SETTINGS_REDO) {
context.versionedData.redo();
context.save();
context.updateTaskPositions();
} else if (iconCode == SettingsIconCode.SETTINGS_MENU) {
new ProjectSettingsModal(context).open();
}