1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-22 06:19:03 +01:00

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

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),