ios: fix new chat swipe

This commit is contained in:
2026-05-03 21:14:10 -07:00
parent ee8a93a8c4
commit aff2531bf3
3 changed files with 17 additions and 20 deletions

View File

@@ -59,11 +59,12 @@ public struct SplitView: View {
viewModel: viewModel,
composerFocusRequest: composerFocusRequest,
navigationLeadingControl: splitNavigationLeadingControl(for: proxy.size),
onShowSidebar: showSidebar
) {
viewModel.startNewChat()
composerFocusRequest += 1
}
onShowSidebar: showSidebar,
onRequestNewChat: {
viewModel.startNewChat()
composerFocusRequest += 1
}
)
}
.navigationSplitViewStyle(.balanced)
.tint(SybilTheme.primary)

View File

@@ -264,16 +264,17 @@ private struct SybilPhoneDestinationView: View {
var body: some View {
SybilWorkspaceView(
viewModel: viewModel,
composerFocusRequest: composerFocusRequest
) {
viewModel.startNewChat()
composerFocusRequest += 1
if path.isEmpty {
path = [.draftChat]
} else {
path[path.index(before: path.endIndex)] = .draftChat
composerFocusRequest: composerFocusRequest,
onRequestNewChat: {
viewModel.startNewChat()
composerFocusRequest += 1
if path.isEmpty {
path = [.draftChat]
} else {
path[path.index(before: path.endIndex)] = .draftChat
}
}
}
)
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
.navigationBarTitleDisplayMode(.inline)
.task(id: route) {

View File

@@ -1301,15 +1301,10 @@ private struct NewChatSwipeBackdrop: View {
.frame(width: 72, height: 72)
.blur(radius: 10)
Image(systemName: hasLatched ? "checkmark" : "plus")
Image(systemName: "plus")
.font(.system(size: 31, weight: .bold, design: .rounded))
.foregroundStyle(SybilTheme.text)
.symbolEffect(.bounce, value: hasLatched)
Image(systemName: "sparkle")
.font(.system(size: 11, weight: .semibold))
.foregroundStyle((hasLatched ? SybilTheme.accent : SybilTheme.primary).opacity(0.90))
.offset(x: -26, y: -25)
}
.frame(width: 92, height: 92)
.background(