Skip to content

Commit 78f1f4b

Browse files
committed
feat: the background color is a constant now
1 parent 16f4ed5 commit 78f1f4b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

WooCommerce/Classes/ViewRelated/Inbox/Inbox.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct Inbox: View {
2020
ForEach(viewModel.noteRowViewModels) { rowViewModel in
2121
InboxNoteRow(viewModel: rowViewModel)
2222
}
23-
.background(Color(.listForeground))
23+
.background(Constants.listForeground)
2424
}
2525
case .empty:
2626
// TODO: 5954 - update empty state
@@ -36,12 +36,12 @@ struct Inbox: View {
3636
.redacted(reason: .placeholder)
3737
.shimmering()
3838
}
39-
.background(Color(.listForeground))
39+
.background(Constants.listForeground)
4040
}
4141
}
4242
}
4343
}
44-
.background(Color(.listBackground).ignoresSafeArea())
44+
.background(Constants.listBackground.ignoresSafeArea())
4545
.navigationTitle(Localization.title)
4646
.onAppear {
4747
viewModel.onLoadTrigger.send()
@@ -50,6 +50,12 @@ struct Inbox: View {
5050
}
5151

5252
private extension Inbox {
53+
54+
enum Constants {
55+
static let listForeground: Color = Color(.listForeground)
56+
static let listBackground: Color = Color(.listBackground)
57+
}
58+
5359
enum Localization {
5460
static let title = NSLocalizedString("Inbox", comment: "Title for the screen that shows inbox notes.")
5561
static let emptyStateTitle = NSLocalizedString("Congrats, you’ve read everything!",

0 commit comments

Comments
 (0)