2.5.0 #10
@@ -131,9 +131,11 @@ struct SidebarView: View {
|
||||
ForEach(folders) { folder in
|
||||
let folderConversations = conversationsByFolder[folder.id] ?? []
|
||||
if !folderConversations.isEmpty || searchText.isEmpty {
|
||||
Section(isExpanded: isExpandedBinding(for: folder.id)) {
|
||||
ForEach(folderConversations) { conversation in
|
||||
conversationRow(conversation)
|
||||
Section {
|
||||
if !collapsedFolders.contains(folder.id) {
|
||||
ForEach(folderConversations) { conversation in
|
||||
conversationRow(conversation)
|
||||
}
|
||||
}
|
||||
} header: {
|
||||
folderHeader(folder)
|
||||
@@ -204,19 +206,6 @@ struct SidebarView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func isExpandedBinding(for folderId: UUID) -> Binding<Bool> {
|
||||
Binding(
|
||||
get: { !collapsedFolders.contains(folderId) },
|
||||
set: { isExpanded in
|
||||
if isExpanded {
|
||||
collapsedFolders.remove(folderId)
|
||||
} else {
|
||||
collapsedFolders.insert(folderId)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private func handleDrop(_ items: [String], toFolder folderId: UUID?) -> Bool {
|
||||
var moved = false
|
||||
for idString in items {
|
||||
@@ -423,6 +412,7 @@ struct SidebarConversationRow: View {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(conversation.name)
|
||||
.font(.system(size: 13, weight: .medium))
|
||||
.foregroundStyle(.primary)
|
||||
.lineLimit(1)
|
||||
HStack(spacing: 4) {
|
||||
Text("^[\(conversation.messageCount) message](inflect: true)")
|
||||
|
||||
@@ -221,9 +221,11 @@ struct ConversationListView: View {
|
||||
ForEach(folders) { folder in
|
||||
let folderConversations = conversationsByFolder[folder.id] ?? []
|
||||
if !folderConversations.isEmpty || searchText.isEmpty {
|
||||
Section(isExpanded: isExpandedBinding(for: folder.id)) {
|
||||
ForEach(folderConversations) { conversation in
|
||||
conversationRow(conversation)
|
||||
Section {
|
||||
if !collapsedFolders.contains(folder.id) {
|
||||
ForEach(folderConversations) { conversation in
|
||||
conversationRow(conversation)
|
||||
}
|
||||
}
|
||||
} header: {
|
||||
folderHeader(folder)
|
||||
@@ -443,19 +445,6 @@ struct ConversationListView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func isExpandedBinding(for folderId: UUID) -> Binding<Bool> {
|
||||
Binding(
|
||||
get: { !collapsedFolders.contains(folderId) },
|
||||
set: { isExpanded in
|
||||
if isExpanded {
|
||||
collapsedFolders.remove(folderId)
|
||||
} else {
|
||||
collapsedFolders.insert(folderId)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private func handleDrop(_ items: [String], toFolder folderId: UUID?) -> Bool {
|
||||
var moved = false
|
||||
for idString in items {
|
||||
@@ -696,6 +685,7 @@ struct ConversationRow: View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(conversation.name)
|
||||
.font(.system(size: 15, weight: .semibold))
|
||||
.foregroundStyle(.primary)
|
||||
.lineLimit(1)
|
||||
|
||||
HStack(spacing: 6) {
|
||||
|
||||
Reference in New Issue
Block a user