mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Channels search, add SDWebImage framework
This commit is contained in:
@@ -13,9 +13,11 @@ final class RecentsModel: ObservableObject {
|
||||
}
|
||||
|
||||
func add(_ item: RecentItem) {
|
||||
if !items.contains(where: { $0.id == item.id }) {
|
||||
items.append(item)
|
||||
if let index = items.firstIndex(where: { $0.id == item.id }) {
|
||||
items.remove(at: index)
|
||||
}
|
||||
|
||||
items.append(item)
|
||||
}
|
||||
|
||||
func close(_ item: RecentItem) {
|
||||
|
Reference in New Issue
Block a user