Make starting a new task on iPhone one tap
This commit is contained in:
@@ -56,7 +56,6 @@ struct PhoneView: View {
|
||||
@Environment(Overlays.self) private var overlays
|
||||
@ViewState private var tab = PhoneTab.lead
|
||||
@ViewState private var path: [PhoneRoute] = []
|
||||
@ViewState private var typing = false
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
@@ -78,17 +77,9 @@ struct PhoneView: View {
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
if !typing {
|
||||
tabBar
|
||||
}
|
||||
tabBar
|
||||
}
|
||||
.scrollDismissesKeyboard(.interactively)
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in
|
||||
typing = true
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification)) { _ in
|
||||
typing = false
|
||||
}
|
||||
.overlay {
|
||||
OverlayHost()
|
||||
}
|
||||
@@ -153,6 +144,18 @@ struct PhoneView: View {
|
||||
tabButton("More", .more)
|
||||
Spacer(minLength: 0)
|
||||
ConnectionMark()
|
||||
Button {
|
||||
overlays.openSwitcher(store)
|
||||
} label: {
|
||||
Image(systemName: "plus")
|
||||
.font(Fonts.font(17, weight: 600))
|
||||
.foregroundStyle(Palette.accent)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 8)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityLabel("New task")
|
||||
Button {
|
||||
tab = .tasks
|
||||
path = []
|
||||
|
||||
Reference in New Issue
Block a user