Files
comaps/iphone/Maps/UI/BottomMenu/TabBar/BottomTabBarPresenter.swift
Yannik Bloscheck 7138970ea6 [ios] Make left button configurable
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2025-07-10 18:07:13 +02:00

38 lines
816 B
Swift

protocol BottomTabBarPresenterProtocol: AnyObject {
func configure()
func onSearchButtonPressed()
func onLeftButtonPressed(withBadge: Bool)
func onBookmarksButtonPressed()
func onMenuButtonPressed()
}
class BottomTabBarPresenter: NSObject {
private let interactor: BottomTabBarInteractorProtocol
init(interactor: BottomTabBarInteractorProtocol) {
self.interactor = interactor
}
}
extension BottomTabBarPresenter: BottomTabBarPresenterProtocol {
func configure() {
}
func onSearchButtonPressed() {
interactor.openSearch()
}
func onLeftButtonPressed(withBadge: Bool) {
withBadge ? interactor.openFaq() : interactor.openLeftButton()
}
func onBookmarksButtonPressed() {
interactor.openBookmarks()
}
func onMenuButtonPressed() {
interactor.openMenu()
}
}