1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-29 22:42:11 -04:00

ui: cleanup some anti patterns

This commit is contained in:
bbedward
2026-06-29 12:39:56 -04:00
parent f293def3a8
commit 50570023ff
6 changed files with 113 additions and 109 deletions
+1 -9
View File
@@ -102,15 +102,7 @@ Item {
return textEditor.hasUnsavedChanges();
}
function hasUnsavedTemporaryContent() {
return hasUnsavedChanges();
}
function createNewTab() {
performCreateNewTab();
}
function performCreateNewTab() {
textEditor.commitLiveBuffer();
NotepadStorageService.createNewTab();
textEditor.applyingShared = true;
@@ -221,7 +213,7 @@ Item {
}
function loadFromFile(fileUrl) {
if (hasUnsavedTemporaryContent()) {
if (hasUnsavedChanges()) {
root.pendingFileUrl = fileUrl;
root.pendingAction = "load_file";
root.confirmationDialogOpen = true;