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, viewModel: viewModel,
composerFocusRequest: composerFocusRequest, composerFocusRequest: composerFocusRequest,
navigationLeadingControl: splitNavigationLeadingControl(for: proxy.size), navigationLeadingControl: splitNavigationLeadingControl(for: proxy.size),
onShowSidebar: showSidebar onShowSidebar: showSidebar,
) { onRequestNewChat: {
viewModel.startNewChat() viewModel.startNewChat()
composerFocusRequest += 1 composerFocusRequest += 1
} }
)
} }
.navigationSplitViewStyle(.balanced) .navigationSplitViewStyle(.balanced)
.tint(SybilTheme.primary) .tint(SybilTheme.primary)

View File

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

View File

@@ -1301,15 +1301,10 @@ private struct NewChatSwipeBackdrop: View {
.frame(width: 72, height: 72) .frame(width: 72, height: 72)
.blur(radius: 10) .blur(radius: 10)
Image(systemName: hasLatched ? "checkmark" : "plus") Image(systemName: "plus")
.font(.system(size: 31, weight: .bold, design: .rounded)) .font(.system(size: 31, weight: .bold, design: .rounded))
.foregroundStyle(SybilTheme.text) .foregroundStyle(SybilTheme.text)
.symbolEffect(.bounce, value: hasLatched) .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) .frame(width: 92, height: 92)
.background( .background(