Various minor fixes

This commit is contained in:
Arkadiusz Fal
2022-11-13 00:07:23 +01:00
parent 4657af2f3d
commit 61d235780d
12 changed files with 71 additions and 62 deletions

View File

@@ -39,21 +39,23 @@ struct DocumentsView: View {
}
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Button {
withAnimation {
model.goBack()
}
} label: {
HStack(spacing: 6) {
Label("Go back", systemImage: "chevron.left")
if model.canGoBack {
Button {
withAnimation {
model.goBack()
}
} label: {
HStack(spacing: 6) {
Label("Go back", systemImage: "chevron.left")
}
}
.transaction { t in t.animation = .none }
.disabled(!model.canGoBack)
}
.transaction { t in t.animation = .none }
.disabled(!model.canGoBack)
}
}
.navigationTitle(model.directoryLabel)
.padding()
.padding(.horizontal)
.navigationBarTitleDisplayMode(RefreshControl.navigationBarTitleDisplayMode)
.backport
.refreshable {