diff --git a/Mail/Components/ChevronIcon.swift b/Mail/Components/ChevronIcon.swift index 532d78021..5868dc5cf 100644 --- a/Mail/Components/ChevronIcon.swift +++ b/Mail/Components/ChevronIcon.swift @@ -37,32 +37,13 @@ struct ChevronIcon: View { } } - enum Color { - case primary, secondary - - var color: MailResourcesColors { - switch self { - case .primary: - return MailResourcesAsset.textPrimaryColor - case .secondary: - return MailResourcesAsset.textSecondaryColor - } - } - } - let style: Style - let color: Color - - init(style: Style, color: Color = .secondary) { - self.style = style - self.color = color - } var body: some View { MailResourcesAsset.arrowUp.swiftUIImage .resizable() .frame(width: 12, height: 12) - .foregroundColor(color.color) + .foregroundColor(MailResourcesAsset.textSecondaryColor) .padding(.vertical, 2) .padding(.horizontal, 1.5) .rotationEffect(style.rotationAngle) diff --git a/Mail/Views/Menu Drawer/Folders/FolderCell.swift b/Mail/Views/Menu Drawer/Folders/FolderCell.swift index 973091e33..342579434 100644 --- a/Mail/Views/Menu Drawer/Folders/FolderCell.swift +++ b/Mail/Views/Menu Drawer/Folders/FolderCell.swift @@ -150,7 +150,7 @@ struct FolderCellContent: View { HStack(spacing: UIConstants.menuDrawerHorizontalItemSpacing) { if canCollapseSubFolders && cellType == .menuDrawer { Button(action: collapseFolder) { - ChevronIcon(style: folder.isExpanded ? .up : .down, color: .secondary) + ChevronIcon(style: folder.isExpanded ? .up : .down) } .opacity(level == 0 && !folder.children.isEmpty ? 1 : 0) .accessibilityLabel(MailResourcesStrings.Localizable.contentDescriptionButtonExpandFolder(folder.name)) diff --git a/Mail/Views/Menu Drawer/Folders/UserFoldersListView.swift b/Mail/Views/Menu Drawer/Folders/UserFoldersListView.swift index ea34a0852..dae360493 100644 --- a/Mail/Views/Menu Drawer/Folders/UserFoldersListView.swift +++ b/Mail/Views/Menu Drawer/Folders/UserFoldersListView.swift @@ -51,7 +51,7 @@ struct UserFoldersListView: View { } } label: { HStack(spacing: 12) { - ChevronIcon(style: isExpanded ? .up : .down, color: .secondary) + ChevronIcon(style: isExpanded ? .up : .down) Text(MailResourcesStrings.Localizable.buttonFolders) .textStyle(.bodySmallSecondary) Spacer() diff --git a/Mail/Views/Menu Drawer/Items/MenuDrawerItemsListView.swift b/Mail/Views/Menu Drawer/Items/MenuDrawerItemsListView.swift index 2eed3c6d2..93ab0a51b 100644 --- a/Mail/Views/Menu Drawer/Items/MenuDrawerItemsListView.swift +++ b/Mail/Views/Menu Drawer/Items/MenuDrawerItemsListView.swift @@ -115,7 +115,7 @@ struct MenuDrawerItemsListView: View { } } label: { HStack(spacing: 12) { - ChevronIcon(style: isExpanded ? .up : .down, color: .secondary) + ChevronIcon(style: isExpanded ? .up : .down) Text(title) .textStyle(.bodySmallSecondary) Spacer() diff --git a/Mail/Views/Menu Drawer/MailboxManagement/MailboxesManagementView.swift b/Mail/Views/Menu Drawer/MailboxManagement/MailboxesManagementView.swift index b40a30d82..cf78fe9dd 100644 --- a/Mail/Views/Menu Drawer/MailboxManagement/MailboxesManagementView.swift +++ b/Mail/Views/Menu Drawer/MailboxManagement/MailboxesManagementView.swift @@ -63,7 +63,7 @@ struct MailboxesManagementView: View { .lineLimit(1) Spacer() if hasOtherMailboxes { - ChevronIcon(style: navigationDrawerState.showMailboxes ? .up : .down, color: .primary) + ChevronIcon(style: navigationDrawerState.showMailboxes ? .up : .down) } } .environment(\.isEnabled, true) diff --git a/Mail/Views/Settings/SettingsSubMenuCell.swift b/Mail/Views/Settings/SettingsSubMenuCell.swift index fc6943307..e25f638da 100644 --- a/Mail/Views/Settings/SettingsSubMenuCell.swift +++ b/Mail/Views/Settings/SettingsSubMenuCell.swift @@ -47,7 +47,7 @@ struct SettingsSubMenuCell: View { } } Spacer() - ChevronIcon(style: .right, color: .secondary) + ChevronIcon(style: .right) } } }