File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,32 @@ struct HomeView: View {
107
107
. padding ( . horizontal, 45 )
108
108
} else {
109
109
List {
110
+ if !home. chats. filter ( { $0. dialog. archived == true } ) . isEmpty {
111
+ Button {
112
+ nav. push ( . archivedChats)
113
+ } label: {
114
+ HStack {
115
+ Spacer ( )
116
+
117
+ Text ( " Archived Chats " )
118
+ . font ( . callout)
119
+ . foregroundColor ( . secondary)
120
+
121
+ Spacer ( )
122
+ }
123
+ . frame ( height: 40 )
124
+ . frame ( maxWidth: . infinity)
125
+ }
126
+ . listRowInsets ( . init(
127
+ top: 0 ,
128
+ leading: 0 ,
129
+ bottom: 0 ,
130
+ trailing: 0
131
+ ) )
132
+ . listRowSeparator ( . hidden)
133
+ . listRowBackground ( Color ( uiColor: . secondarySystemFill) . opacity ( 0.5 ) )
134
+ }
135
+
110
136
ForEach ( combinedItems, id: \. stableId) { item in
111
137
chatOrSpaceView ( for: item)
112
138
. transaction { transaction in
You can’t perform that action at this time.
0 commit comments