Skip to content

Commit caa80af

Browse files
committed
Keep header in loading state view and adjust height of empty state view
1 parent 16d4466 commit caa80af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

WooCommerce/Classes/Bookings/BookingList/BookingListView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ private extension BookingListView {
9090

9191
var loadingView: some View {
9292
VStack {
93+
header
9394
Spacer()
9495
ProgressView().progressViewStyle(.circular)
9596
Spacer()
@@ -158,7 +159,8 @@ private extension BookingListView {
158159
LazyVStack(spacing: 0, pinnedViews: .sectionHeaders) {
159160
Section {
160161
emptyStateContent(isSearching: isSearching)
161-
.frame(minWidth: proxy.size.width, minHeight: proxy.size.height)
162+
.frame(minWidth: proxy.size.width,
163+
minHeight: proxy.size.height - BookingListViewLayout.defaultHeaderHeight * scale)
162164
} header: {
163165
header
164166
}
@@ -233,6 +235,7 @@ fileprivate enum BookingListViewLayout {
233235
static let emptyStatePadding: CGFloat = 24
234236
static let emptyStateImageWidth: CGFloat = 67
235237
static let cornerRadius: CGFloat = 8
238+
static let defaultHeaderHeight: CGFloat = 98
236239
}
237240

238241
fileprivate enum BookingListViewLocalization {

0 commit comments

Comments
 (0)