Skip to content

Commit d04c772

Browse files
authored
Fix warning about offline banner on dashboard (#16347)
2 parents f029712 + 9f2124c commit d04c772

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [*] Fix order details presentation when opened from booking details [https://github.com/woocommerce/woocommerce-ios/pull/16331]
1010
- [*] Show POS feedback surveys for eligible merchants [https://github.com/woocommerce/woocommerce-ios/pull/16325]
1111
- [*] Fix product variation selection for order creation [https://github.com/woocommerce/woocommerce-ios/pull/16317]
12+
- [Internal] Fix warning when displaying offline banner on My Store [https://github.com/woocommerce/woocommerce-ios/pull/16347]
1213
- [Internal] Notify listeners immediately after updating predicates or sort descriptors for results controllers. [https://github.com/woocommerce/woocommerce-ios/pull/16350]
1314

1415
23.6

WooCommerce/Classes/ViewRelated/Dashboard/DashboardView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ struct DashboardView: View {
162162

163163
storePlanBanner
164164
.renderedIf(connectivityStatus != .notReachable)
165+
166+
OfflineBannerViewRepresentable()
167+
.frame(height: OfflineBannerView.height)
168+
.renderedIf(connectivityStatus == .notReachable)
165169
}
166170
.sheet(isPresented: $showingSupportForm) {
167171
supportForm

WooCommerce/Classes/ViewRelated/Dashboard/DashboardViewHostingController.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ final class DashboardViewHostingController: UIHostingController<DashboardView> {
7575
await viewModel.reloadAllData()
7676
}
7777
}
78-
79-
override var shouldShowOfflineBanner: Bool {
80-
return true
81-
}
8278
}
8379

8480
// MARK: Private helpers

0 commit comments

Comments
 (0)