ios: fix new chat swipe
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user