]> git.scottworley.com Git - vopamoi/commitdiff
Replace setUntaggedView() with a TagFilter
authorScott Worley <scottworley@scottworley.com>
Fri, 20 Oct 2023 21:42:56 +0000 (14:42 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 20 Oct 2023 21:42:56 +0000 (14:42 -0700)
This fixes the untagged view's title

vopamoi.ts

index 926a1f002c3df87695378176eb999f0a5b068ee1..f37ce2e787559c6b4ce7e6db72b6c68f115f8a87 100644 (file)
@@ -689,16 +689,7 @@ function BrowserUI() {
     },
 
     setUntaggedView: function () {
     },
 
     setUntaggedView: function () {
-      if (currentTagFilter !== null) {
-        this.resetTagView();
-      }
-      for (const task of document.getElementsByClassName("task")) {
-        if (task.getElementsByClassName("tag").length === 0) {
-          task.classList.remove("hide");
-        } else {
-          task.classList.add("hide");
-        }
-      }
+      this.setTagFilter({description: "(untagged)", include: task => task.getElementsByClassName("tag").length === 0});
     },
 
     undo: function () {
     },
 
     undo: function () {