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

allows setting Milestone's loading indicator's color #2195

Merged
merged 2 commits into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/Labels/LabelsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class LabelsViewController: BaseListViewController2<String>, BaseListViewC
preferredContentSize = Styles.Sizes.contextMenuSize
title = Constants.Strings.labels
feed.collectionView.backgroundColor = Styles.Colors.menuBackgroundColor.color
feed.setLoadingSpinnerColor(to: .white)
dataSource = self
}

Expand Down
1 change: 1 addition & 0 deletions Classes/Milestones/MilestonesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ MilestoneSectionControllerDelegate {
title = Constants.Strings.milestone
preferredContentSize = Styles.Sizes.contextMenuSize
feed.collectionView.backgroundColor = Styles.Colors.menuBackgroundColor.color
feed.setLoadingSpinnerColor(to: .white)
dataSource = self
}

Expand Down
1 change: 1 addition & 0 deletions Classes/People/PeopleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ PeopleSectionControllerDelegate {
}

feed.collectionView.backgroundColor = Styles.Colors.menuBackgroundColor.color
feed.setLoadingSpinnerColor(to: .white)
preferredContentSize = Styles.Sizes.contextMenuSize
updateSelectionCount()
}
Expand Down
4 changes: 4 additions & 0 deletions Classes/Systems/Feed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ final class Feed: NSObject, UIScrollViewDelegate {
func showEmptyLoadingView() {
loadingView.isHidden = false
}

func setLoadingSpinnerColor(to color: UIColor) {
loadingView.setSpinnerColor(to: color)
}

func viewDidLoad() {
guard let view = adapter.viewController?.view else { return }
Expand Down
4 changes: 4 additions & 0 deletions Classes/Views/EmptyLoadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ final class EmptyLoadingView: UIView {
activity.startAnimating()
addSubview(activity)
}

func setSpinnerColor(to color: UIColor) {
activity.color = color
}

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