Unify forms, add to/remove from playlist on all platforms, UI improvements

This commit is contained in:
Arkadiusz Fal
2021-09-28 20:06:05 +02:00
parent 17291b47e0
commit 7446c945b5
29 changed files with 644 additions and 448 deletions

View File

@@ -16,7 +16,7 @@ final class RecentsModel: ObservableObject {
items.removeAll { $0.type == .query }
}
func open(_ item: RecentItem) {
func add(_ item: RecentItem) {
if !items.contains(where: { $0.id == item.id }) {
items.append(item)
}
@@ -30,7 +30,7 @@ final class RecentsModel: ObservableObject {
func addQuery(_ query: String) {
if !query.isEmpty {
open(.init(from: query))
add(.init(from: query))
}
}