Highlight item when in favorites
This commit is contained in:
parent
b88eedc42c
commit
9c916b335e
|
@ -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) {
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue