فهرست منبع

refactor: make notes/tags visible by default

Sam Jaffe 3 هفته پیش
والد
کامیت
f162675e02
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      Todos/View/TaskView.swift

+ 4 - 4
Todos/View/TaskView.swift

@@ -40,7 +40,7 @@ struct TaskView: View {
         }
       }
       
-      if showTags {
+      if showTags || !(hideTags || task.tags.isEmpty) {
         HStack {
           TagBarView(tags: $task.tags)
             .font(.footnote)
@@ -49,7 +49,7 @@ struct TaskView: View {
         }
       }
       
-      if showNotes {
+      if showNotes || !(hideNotes || task.notes.isEmpty) {
         HStack {
           TextField("Notes", text: $task.notes)
             .font(.footnote)
@@ -67,8 +67,8 @@ struct TaskView: View {
         }
       }
     }.onHover { yes in
-      showTags = yes || !(hideTags || task.tags.isEmpty)
-      showNotes = yes || !(hideNotes || task.notes.isEmpty)
+      showTags = yes
+      showNotes = yes
     }
   }
 }