Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit cbb20f8

Browse files
BrianLitwinrnystrom
authored andcommitted
allows setting Milestone's loading indicator's color (#2195)
* allows setting loading indicator's color * updated spinner color to .white in Milestones/Labels/People
1 parent 95a20d9 commit cbb20f8

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

Classes/Labels/LabelsViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ final class LabelsViewController: BaseListViewController2<String>, BaseListViewC
3030
preferredContentSize = Styles.Sizes.contextMenuSize
3131
title = Constants.Strings.labels
3232
feed.collectionView.backgroundColor = Styles.Colors.menuBackgroundColor.color
33+
feed.setLoadingSpinnerColor(to: .white)
3334
dataSource = self
3435
}
3536

Classes/Milestones/MilestonesViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ MilestoneSectionControllerDelegate {
4343
title = Constants.Strings.milestone
4444
preferredContentSize = Styles.Sizes.contextMenuSize
4545
feed.collectionView.backgroundColor = Styles.Colors.menuBackgroundColor.color
46+
feed.setLoadingSpinnerColor(to: .white)
4647
dataSource = self
4748
}
4849

Classes/People/PeopleViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ PeopleSectionControllerDelegate {
5555
}
5656

5757
feed.collectionView.backgroundColor = Styles.Colors.menuBackgroundColor.color
58+
feed.setLoadingSpinnerColor(to: .white)
5859
preferredContentSize = Styles.Sizes.contextMenuSize
5960
updateSelectionCount()
6061
}

Classes/Systems/Feed.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ final class Feed: NSObject, UIScrollViewDelegate {
6666
func showEmptyLoadingView() {
6767
loadingView.isHidden = false
6868
}
69+
70+
func setLoadingSpinnerColor(to color: UIColor) {
71+
loadingView.setSpinnerColor(to: color)
72+
}
6973

7074
func viewDidLoad() {
7175
guard let view = adapter.viewController?.view else { return }

Classes/Views/EmptyLoadingView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ final class EmptyLoadingView: UIView {
1717
activity.startAnimating()
1818
addSubview(activity)
1919
}
20+
21+
func setSpinnerColor(to color: UIColor) {
22+
activity.color = color
23+
}
2024

2125
required init?(coder aDecoder: NSCoder) {
2226
fatalError("init(coder:) has not been implemented")

0 commit comments

Comments
 (0)