chore: Move accountToggleIndicator to Constants
This commit is contained in:
parent
3acdbcc2ce
commit
3a2c99c75a
|
@ -16,6 +16,9 @@ import MastodonCore
|
||||||
import MastodonLocalization
|
import MastodonLocalization
|
||||||
|
|
||||||
final class SidebarViewModel {
|
final class SidebarViewModel {
|
||||||
|
private enum Constants {
|
||||||
|
static let accountToggleIndicator = UIImage(systemName: "chevron.up.chevron.down")
|
||||||
|
}
|
||||||
|
|
||||||
var disposeBag = Set<AnyCancellable>()
|
var disposeBag = Set<AnyCancellable>()
|
||||||
|
|
||||||
|
@ -80,7 +83,7 @@ extension SidebarViewModel {
|
||||||
}()
|
}()
|
||||||
cell.item = SidebarListContentView.Item(
|
cell.item = SidebarListContentView.Item(
|
||||||
isActive: false,
|
isActive: false,
|
||||||
accessoryImage: item == .me ? UIImage(systemName: "chevron.up.chevron.down") : nil,
|
accessoryImage: item == .me ? Constants.accountToggleIndicator : nil,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
image: item.image,
|
image: item.image,
|
||||||
activeImage: item.selectedImage,
|
activeImage: item.selectedImage,
|
||||||
|
@ -167,7 +170,7 @@ extension SidebarViewModel {
|
||||||
case .compose:
|
case .compose:
|
||||||
let item = SidebarListContentView.Item(
|
let item = SidebarListContentView.Item(
|
||||||
isActive: false,
|
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,
|
title: L10n.Common.Controls.Actions.compose,
|
||||||
image: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate),
|
image: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate),
|
||||||
activeImage: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate),
|
activeImage: Asset.ObjectsAndTools.squareAndPencil.image.withRenderingMode(.alwaysTemplate),
|
||||||
|
|
Loading…
Reference in New Issue