ulozeni gitDirStatTree do promene

This commit is contained in:
2021-01-09 14:19:35 +01:00
parent f1488f847a
commit 4696151eef
2 changed files with 32 additions and 26 deletions

View File

@@ -80,14 +80,7 @@ class Controller {
}
updateFileStats() {
this.model.getGitStatusTree().then(
function (value) {
this.view.statDirTree(value, undefined);
}.bind(this),
function (error) {
console.log(error);
}
);
this.view.statDirTree(this.model.gitDirTreeStat, undefined);
}
/* ================== Text Area ================== */
@@ -113,16 +106,23 @@ class Controller {
saveFile() {
var textArea = this.view.simplemde;
this.model.saveFile(this.openedFile, textArea.value());
this.openedFileValue = textArea.value();
this.saveButton();
this.model.saveFile(this.openedFile, textArea.value()).then(
function() {
this.openedFileValue = textArea.value();
this.view.closeEditor();
this.saveButton();
this.updateFileStats();
this.updateFileStats();
}.bind(this)
);
}
/* ================== Controls ================== */
wipeFS() {
this.view.closeEditor();
this.model.wipeFS().then(function () {
this.redrawDirTree();
}.bind(this));