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