chore: Move accountToggleIndicator to Constants

This commit is contained in:
Marcus Kida 2022-11-15 14:09:51 +01:00
parent 3acdbcc2ce
commit 3a2c99c75a
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
1 changed files with 5 additions and 2 deletions

View File

@ -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<AnyCancellable>()
@ -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),