mirror of
https://github.com/yattee/yattee.git
synced 2025-11-25 18:58:21 +00:00
Add tap on search to focus search field on iOS
This commit is contained in:
@@ -63,7 +63,9 @@ final class NavigationModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
@Published var tabSelection: TabSelection!
|
||||
@Published var tabSelection: TabSelection! { didSet {
|
||||
if oldValue == tabSelection { multipleTapHandler() }
|
||||
}}
|
||||
|
||||
@Published var presentingAddToPlaylist = false
|
||||
@Published var videoToAddToPlaylist: Video!
|
||||
@@ -295,6 +297,15 @@ final class NavigationModel: ObservableObject {
|
||||
channelPresentedInSheet = channel
|
||||
presentingChannelSheet = true
|
||||
}
|
||||
|
||||
func multipleTapHandler() {
|
||||
switch tabSelection {
|
||||
case .search:
|
||||
self.search.focused = true
|
||||
default:
|
||||
print("not implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typealias TabSelection = NavigationModel.TabSelection
|
||||
|
||||
Reference in New Issue
Block a user