Hide page controls in libraries where unnecessary
This commit is contained in:
parent
efeb1c142e
commit
b18e2e3ae4
|
|
@ -285,18 +285,20 @@ struct LibraryView: View {
|
||||||
.navigationTitle(extraParam == "" ? (library_names[prefill_id] ?? "Library") : title)
|
.navigationTitle(extraParam == "" ? (library_names[prefill_id] ?? "Library") : title)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
ToolbarItemGroup(placement: .navigationBarTrailing) {
|
||||||
if(firstItemIndex != 0) {
|
if(totalItemCount > itemsPerPage) {
|
||||||
Button {
|
if(firstItemIndex != 0) {
|
||||||
previousPage()
|
Button {
|
||||||
} label: {
|
previousPage()
|
||||||
Image(systemName: "chevron.left")
|
} label: {
|
||||||
|
Image(systemName: "chevron.left")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if(lastItemIndex != totalItemCount) {
|
||||||
if(lastItemIndex != totalItemCount) {
|
Button {
|
||||||
Button {
|
nextPage()
|
||||||
nextPage()
|
} label: {
|
||||||
} label: {
|
Image(systemName: "chevron.right")
|
||||||
Image(systemName: "chevron.right")
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NavigationLink(destination: LibrarySearchView(url: url, close: $closeSearch), isActive: $closeSearch) {
|
NavigationLink(destination: LibrarySearchView(url: url, close: $closeSearch), isActive: $closeSearch) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue