Skip to content

Commit bd57afb

Browse files
committed
Adds Untagged in view settings
1 parent 7158e96 commit bd57afb

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

FSNotes/Base.lproj/Main.storyboard

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,12 @@ CA
697697
<action selector="sidebarItemVisibility:" target="L4m-js-agn" id="9eO-fj-M9I"/>
698698
</connections>
699699
</menuItem>
700+
<menuItem title="Untagged" state="on" tag="6" id="BX0-nb-tVk">
701+
<modifierMask key="keyEquivalentModifierMask"/>
702+
<connections>
703+
<action selector="sidebarItemVisibility:" target="L4m-js-agn" id="Je9-DX-4lc"/>
704+
</connections>
705+
</menuItem>
700706
<menuItem title="Todo" state="on" tag="3" id="e0G-y0-N0C">
701707
<modifierMask key="keyEquivalentModifierMask"/>
702708
<connections>

FSNotes/Business/Sidebar.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class Sidebar {
1717
init() {
1818
var system = [SidebarItem]()
1919

20-
// if UserDefaultsManagement.sidebarVisibilityNotes {
21-
// let notes = SidebarItem(name: NSLocalizedString("Notes", comment: ""), type: .All)
22-
// system.append(notes)
23-
// }
20+
if UserDefaultsManagement.sidebarVisibilityNotes {
21+
let notes = SidebarItem(name: NSLocalizedString("Notes", comment: ""), type: .All)
22+
system.append(notes)
23+
}
2424

2525
if UserDefaultsManagement.sidebarVisibilityTodo {
2626
let todo = SidebarItem(name: NSLocalizedString("Todo", comment: ""), type: .Todo)

FSNotes/Helpers/UserDefaultsManagement.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ public class UserDefaultsManagement {
13111311
if let result = shared?.object(forKey: "sidebarVisibilityInbox") as? Bool {
13121312
return result
13131313
}
1314-
return true
1314+
return false
13151315
}
13161316
set {
13171317
shared?.set(newValue, forKey: "sidebarVisibilityInbox")
@@ -1323,7 +1323,7 @@ public class UserDefaultsManagement {
13231323
if let result = shared?.object(forKey: "sidebarVisibilityNotes") as? Bool {
13241324
return result
13251325
}
1326-
return true
1326+
return false
13271327
}
13281328
set {
13291329
shared?.set(newValue, forKey: "sidebarVisibilityNotes")

FSNotes/ViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ class ViewController: NSViewController,
323323
menuItem.state = UserDefaultsManagement.sidebarVisibilityArchive ? .on : .off
324324
case 5:
325325
menuItem.state = UserDefaultsManagement.sidebarVisibilityTrash ? .on : .off
326+
case 6:
327+
menuItem.state = UserDefaultsManagement.sidebarVisibilityUntagged ? .on : .off
326328
default:
327329
break
328330
}
@@ -2315,6 +2317,8 @@ class ViewController: NSViewController,
23152317
UserDefaultsManagement.sidebarVisibilityArchive = isChecked
23162318
case 5:
23172319
UserDefaultsManagement.sidebarVisibilityTrash = isChecked
2320+
case 6:
2321+
UserDefaultsManagement.sidebarVisibilityUntagged = isChecked
23182322
default:
23192323
break
23202324
}

0 commit comments

Comments
 (0)