diff options
| author | Christian Cleberg <[email protected]> | 2026-04-13 19:06:54 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-13 19:06:54 -0500 |
| commit | a6ad2b9815d72575206bdca860eef9db850cdf1c (patch) | |
| tree | b4d5f27aa1655e5e40bab178550d6e2576d7df8b /Hutch/Views/Work | |
| parent | 02a44d115b3784231cad640e992d9c18a7f67b40 (diff) | |
| download | hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.tar.gz hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.tar.bz2 hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.zip | |
feat(theme): AMOLED true-black rows via themedRow()
Apply listRowBackground(Color.black) per row in AMOLED mode using ThemedRowStyle
and themedRow() across Lists and Forms. Use themedList() for scroll/grouped
backgrounds. Treat segmented and clear list rows with isAMOLED-aware
listRowBackground where Color.clear was required. Removes reliance on UIKit
appearance for list cells on iOS 16+.
Implements: https://todo.sr.ht/~ccleberg/hutch/24
Diffstat (limited to 'Hutch/Views/Work')
| -rw-r--r-- | Hutch/Views/Work/WorkView.swift | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Hutch/Views/Work/WorkView.swift b/Hutch/Views/Work/WorkView.swift index a7fbd1c..2326236 100644 --- a/Hutch/Views/Work/WorkView.swift +++ b/Hutch/Views/Work/WorkView.swift @@ -11,6 +11,7 @@ struct WorkView: View { @AppStorage(AppStorageKeys.swipeActionsEnabled, store: .standard) private var swipeActionsEnabled = true @Environment(AppState.self) private var appState + @Environment(\.isAMOLEDTheme) private var isAMOLED @Environment(\.scenePhase) private var scenePhase @State private var viewModel: HomeViewModel? @State private var scope: Scope = .all @@ -74,6 +75,7 @@ struct WorkView: View { } } .padding(.vertical, 2) + .themedRow() } } @@ -88,6 +90,7 @@ struct WorkView: View { if workCount(viewModel) == 0 { Section { WorkCompactMessageRow(text: "Nothing to do", systemImage: "checkmark.circle") + .themedRow() } } } @@ -100,7 +103,7 @@ struct WorkView: View { } } .pickerStyle(.segmented) - .listRowBackground(Color.clear) + .listRowBackground(isAMOLED ? Color.black : Color.clear) .listRowInsets(EdgeInsets()) } } @@ -110,9 +113,11 @@ struct WorkView: View { Section { if isLoadingUnread(viewModel) { WorkLoadingRow(label: "Loading unread threads") + .themedRow() } else if viewModel.unreadInboxThreads.isEmpty { if compactWhenEmpty { WorkCompactMessageRow(text: "No unread threads", systemImage: "tray") + .themedRow() } } else { ForEach(viewModel.unreadInboxThreads) { thread in @@ -137,6 +142,7 @@ struct WorkView: View { } } } + .themedRow() } } header: { Text("Unread Threads") @@ -155,8 +161,10 @@ struct WorkView: View { Section { if viewModel.isLoadingAssignedTickets && viewModel.assignedTickets.isEmpty { WorkLoadingRow(label: "Loading assigned tickets") + .themedRow() } else if viewModel.assignedTickets.isEmpty { WorkCompactMessageRow(text: "No assigned tickets", systemImage: "person.crop.circle.badge.checkmark") + .themedRow() } else { ForEach(viewModel.assignedTickets) { ticket in NavigationLink { @@ -200,6 +208,7 @@ struct WorkView: View { } } } + .themedRow() } } header: { Text("Assigned Tickets") |
