1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 14:20:32 +05:30

Hide keyboard on navigation

This commit is contained in:
Arkadiusz Fal 2022-08-09 21:14:05 +02:00
parent 7dcba77cf0
commit f8d240ad86
2 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,7 @@ final class NavigationModel: ObservableObject {
return return
} }
navigation.hideKeyboard()
player.hide() player.hide()
navigation.presentingChannel = false navigation.presentingChannel = false
@ -130,6 +131,8 @@ final class NavigationModel: ObservableObject {
player.hide() player.hide()
#endif #endif
navigation.hideKeyboard()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
recents.add(recent) recents.add(recent)
@ -156,6 +159,8 @@ final class NavigationModel: ObservableObject {
navigation.presentingPlaylist = false navigation.presentingPlaylist = false
navigation.tabSelection = .search navigation.tabSelection = .search
navigation.hideKeyboard()
if let searchQuery = searchQuery { if let searchQuery = searchQuery {
let recent = RecentItem(from: searchQuery) let recent = RecentItem(from: searchQuery)
recents.add(recent) recents.add(recent)

View File

@ -202,6 +202,8 @@ final class PlayerModel: ObservableObject {
} }
#endif #endif
navigation.hideKeyboard()
DispatchQueue.main.async { [weak self] in DispatchQueue.main.async { [weak self] in
withAnimation(.linear(duration: 0.25)) { withAnimation(.linear(duration: 0.25)) {
self?.presentingPlayer = true self?.presentingPlayer = true