Unverified Commit 0f50f4f2 authored by Zach Knox's avatar Zach Knox
Browse files

added note on Filter button to show user if filters are on or not

parent 68cb906d
......@@ -114,9 +114,30 @@ class FacilitiesListViewController: UIViewController, UICollectionViewDelegate,
@IBAction func RefreshButton(_ sender: Any) {
refresh(sender, forceUpdate: true)
}
func checkFilterState() {
if(filters.showOpen && filters.showClosed && filters.openFirst && filters.sortBy == SortMethod.alphabetical) {
for f in filters.onlyFromCategories {
if(f.value != true) {
LeftButton.title = "Filter (On)"
return
}
}
for f in filters.onlyFromLocations {
if(f.value != true) {
LeftButton.title = "Filter (On)"
return
}
}
LeftButton.title = "Filter"
return
}
LeftButton.title = "Filter (On)"
}
override func viewWillAppear(_ animated: Bool) {
LastUpdatedLabel.isEnabled = false
checkFilterState()
}
@objc func tapRecognizer(_ sender: UITapGestureRecognizer) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment