Skip to content

Commit 0badc90

Browse files
committed
Add archived chats view
1 parent 5797284 commit 0badc90

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

apple/InlineIOS/Main/HomeView.swift

+26
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,32 @@ struct HomeView: View {
107107
.padding(.horizontal, 45)
108108
} else {
109109
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+
110136
ForEach(combinedItems, id: \.stableId) { item in
111137
chatOrSpaceView(for: item)
112138
.transaction { transaction in

0 commit comments

Comments
 (0)