Highlight item when in favorites

This commit is contained in:
Davide De Rosa 2019-11-21 15:01:39 +01:00
parent b88eedc42c
commit 9c916b335e
2 changed files with 13 additions and 0 deletions

View File

@ -160,6 +160,16 @@ extension UIActivityIndicatorView {
} }
} }
extension UIBarButtonItem {
func apply(_ theme: Theme) {
tintColor = nil
}
func applyAccent(_ theme: Theme) {
tintColor = theme.palette.accent1
}
}
// XXX: status bar is broken // XXX: status bar is broken
extension MFMailComposeViewController { extension MFMailComposeViewController {
func apply(_ theme: Theme) { func apply(_ theme: Theme) {

View File

@ -94,6 +94,9 @@ class ProviderPoolViewController: UIViewController {
isShowingFavorites = !isShowingFavorites isShowingFavorites = !isShowingFavorites
if isShowingFavorites { if isShowingFavorites {
reloadFavorites() reloadFavorites()
navigationItem.rightBarButtonItem?.applyAccent(.current)
} else {
navigationItem.rightBarButtonItem?.apply(.current)
} }
tableView.reloadData() tableView.reloadData()
} }