From 3a2c99c75af27b8133a5dde1b6edfcc51a26ca31 Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Tue, 15 Nov 2022 14:09:51 +0100 Subject: [PATCH] chore: Move accountToggleIndicator to Constants --- Mastodon/Scene/Root/Sidebar/SidebarViewModel.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mastodon/Scene/Root/Sidebar/SidebarViewModel.swift b/Mastodon/Scene/Root/Sidebar/SidebarViewModel.swift index b6a30ee60..6ceb20527 100644 --- a/Mastodon/Scene/Root/Sidebar/SidebarViewModel.swift +++ b/Mastodon/Scene/Root/Sidebar/SidebarViewModel.swift @@ -16,6 +16,9 @@ import MastodonCore import MastodonLocalization final class SidebarViewModel { + private enum Constants { + static let accountToggleIndicator = UIImage(systemName: "chevron.up.chevron.down") + } var disposeBag = Set() @@ -80,7 +83,7 @@ extension SidebarViewModel { }() cell.item = SidebarListContentView.Item( isActive: false, - accessoryImage: item == .me ? UIImage(systemName: "chevron.up.chevron.down") : nil, + accessoryImage: item == .me ? Constants.accountToggleIndicator : nil, title: item.title, image: item.image, activeImage: item.selectedImage, @@ -167,7 +170,7 @@ extension SidebarViewModel { case .compose: let item = SidebarListContentView.Item( isActive: false, - accessoryImage: self.currentTab == .me ? UIImage(systemName: "chevron.up.chevron.down") : nil, + accessoryImage: self.currentTab == .me ? Constants.accountToggleIndicator : nil, title: L10n.Common.Controls.Actions.compose, image: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate), activeImage: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate),