Skip to content

Commit 608e885

Browse files
committed
fix: background color of padding of rows
1 parent 44d2701 commit 608e885

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

WooCommerce/Classes/ViewRelated/Inbox/Inbox.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@ struct Inbox: View {
1818
InfiniteScrollList(isLoading: viewModel.shouldShowBottomActivityIndicator,
1919
loadAction: viewModel.onLoadNextPageAction) {
2020
ForEach(viewModel.noteRowViewModels) { rowViewModel in
21-
if #available(iOS 15.0, *) {
22-
// In order to show full-width separator, the default list separator is hidden and a `Divider` is shown inside the row.
23-
InboxNoteRow(viewModel: rowViewModel)
24-
} else {
25-
InboxNoteRow(viewModel: rowViewModel)
26-
}
27-
}.background(Color(.listForeground))
21+
InboxNoteRow(viewModel: rowViewModel)
22+
}
23+
.background(Color(.listForeground))
2824
}
2925
case .empty:
3026
// TODO: 5954 - update empty state

WooCommerce/Classes/ViewRelated/Inbox/InboxNoteRow.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,9 @@ struct InboxNoteRow: View {
4949
}
5050
.padding(Constants.defaultPadding)
5151

52-
if #available(iOS 15.0, *) {
53-
// In order to show full-width separator, the default list separator is hidden and a `Divider` is shown inside the row.
54-
Divider()
55-
.frame(height: Constants.dividerHeight)
56-
}
52+
Divider()
53+
.frame(height: Constants.dividerHeight)
5754
}
58-
.listRowInsets(.zero)
5955
}
6056
}
6157

WooCommerce/Classes/ViewRelated/Orders/Order Creation/ProductsSection/AddProductToOrder.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ struct AddProductToOrder: View {
2121
loadAction: viewModel.syncNextPage) {
2222
ForEach(viewModel.productRows) { rowViewModel in
2323
createProductRow(rowViewModel: rowViewModel)
24+
.padding(Constants.defaultPadding)
2425
Divider().frame(height: Constants.dividerHeight)
26+
.padding(.leading, Constants.defaultPadding)
2527
}
2628
}
2729
.background(Color(.listForeground))
@@ -78,6 +80,7 @@ struct AddProductToOrder: View {
7880
private extension AddProductToOrder {
7981
enum Constants {
8082
static let dividerHeight: CGFloat = 1
83+
static let defaultPadding: CGFloat = 16
8184
}
8285

8386
enum Localization {

WooCommerce/Classes/ViewRelated/Orders/Order Creation/ProductsSection/AddProductVariationToOrder.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ struct AddProductVariationToOrder: View {
2121
loadAction: viewModel.syncNextPage) {
2222
ForEach(viewModel.productVariationRows) { rowViewModel in
2323
ProductRow(viewModel: rowViewModel)
24+
.padding(Constants.defaultPadding)
2425
.onTapGesture {
2526
viewModel.selectVariation(rowViewModel.productOrVariationID)
2627
isPresented.toggle()
2728
}
2829
Divider().frame(height: Constants.dividerHeight)
30+
.padding(.leading, Constants.defaultPadding)
2931
}
3032
.background(Color(.listForeground))
3133
}
@@ -68,6 +70,7 @@ struct AddProductVariationToOrder: View {
6870
private extension AddProductVariationToOrder {
6971
enum Constants {
7072
static let dividerHeight: CGFloat = 1
73+
static let defaultPadding: CGFloat = 16
7174
}
7275

7376
enum Localization {

0 commit comments

Comments
 (0)