[ios] Fixed crash on isolines click

Buttons were removed from xib and are left uninitialized

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2021-03-03 22:55:34 +01:00 committed by Alexander Borsuk
parent 3601fe1291
commit 3043771e5e

View file

@ -39,12 +39,16 @@ class BottomMenuLayersCell: UITableViewCell {
}
private func updateGuidesButton() {
// TODO: Either remove guides or enable button back in xib.
if guidesButton == nil { return }
let enabled = MapOverlayManager.guidesEnabled()
guidesButton.setStyleAndApply(enabled ? "MenuButtonEnabled" : "MenuButtonDisabled")
guidesButton.isBadgeHidden = !MapOverlayManager.guidesFirstLaunch()
}
private func updateTrafficButton() {
// TODO: enable button back in xib.
if trafficButton == nil { return }
let enabled = MapOverlayManager.trafficEnabled()
trafficButton.setStyleAndApply(enabled ? "MenuButtonEnabled" : "MenuButtonDisabled")
}