@@ -34,12 +34,14 @@ public struct SidebarView: View {
3434 private let onSelect : ( Selection ) -> Void
3535 private let onSyncNow : ( ) -> Void
3636 private let onSettings : ( ) -> Void
37+ private let onCompose : ( ) -> Void
3738
3839 public init (
3940 accountEmail: String ? , unreadCount: Int , labels: [ LabelRecord ] , pendingCount: Int ,
4041 isSyncing: Bool = false , syncBanner: String ? = nil ,
4142 selection: Selection , onSelect: @escaping ( Selection ) -> Void ,
42- onSyncNow: @escaping ( ) -> Void = { } , onSettings: @escaping ( ) -> Void = { }
43+ onSyncNow: @escaping ( ) -> Void = { } , onSettings: @escaping ( ) -> Void = { } ,
44+ onCompose: @escaping ( ) -> Void = { }
4345 ) {
4446 self . accountEmail = accountEmail
4547 self . unreadCount = unreadCount
@@ -51,6 +53,7 @@ public struct SidebarView: View {
5153 self . onSelect = onSelect
5254 self . onSyncNow = onSyncNow
5355 self . onSettings = onSettings
56+ self . onCompose = onCompose
5457 }
5558
5659 public var body : some View {
@@ -64,6 +67,12 @@ public struct SidebarView: View {
6467 . foregroundStyle ( Palette . ink)
6568 . lineLimit ( 1 )
6669 . truncationMode ( . middle)
70+ . padding ( . horizontal, Metrics . unit * 3 )
71+ . padding ( . bottom, Metrics . unit * 3 )
72+
73+ // The primary "start a new email" affordance (also ⌘N). Was
74+ // missing — you could reply but not compose from scratch.
75+ PrimaryButton ( title: " New message " , action: onCompose)
6776 . padding ( . horizontal, Metrics . unit * 3 )
6877 . padding ( . bottom, Metrics . unit * 4 )
6978
0 commit comments