mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Fix sidebar navigation
This commit is contained in:
parent
d47ecb2723
commit
40ac137461
@ -65,6 +65,11 @@ final class NavigationModel: ObservableObject {
|
||||
|
||||
@Published var tabSelection: TabSelection! { didSet {
|
||||
if oldValue == tabSelection { multipleTapHandler() }
|
||||
if tabSelection == nil, let item = recents.presentedItem {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.tabSelection = .recentlyOpened(item.tag)
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
@Published var presentingAddToPlaylist = false
|
||||
|
@ -62,6 +62,12 @@ final class RecentsModel: ObservableObject {
|
||||
return nil
|
||||
}
|
||||
|
||||
var presentedItem: RecentItem? {
|
||||
guard let recent = items.last else { return nil }
|
||||
|
||||
return recent
|
||||
}
|
||||
|
||||
static func symbolSystemImage(_ name: String) -> String {
|
||||
let firstLetter = name.first?.lowercased()
|
||||
let regex = #"^[a-z0-9]$"#
|
||||
|
Loading…
Reference in New Issue
Block a user