mirror of
https://github.com/yattee/yattee.git
synced 2025-10-12 02:18:17 +00:00
Add hiding short videos
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Cache
|
||||
import CoreData
|
||||
import Defaults
|
||||
import Foundation
|
||||
import Siesta
|
||||
import SwiftyJSON
|
||||
@@ -237,6 +238,10 @@ final class FeedModel: ObservableObject, CacheModel {
|
||||
let watches = watchFetchRequestResult(videos, context: backgroundContext)
|
||||
let watchesIDs = watches.map(\.videoID)
|
||||
let unwatched = videos.filter { video in
|
||||
if Defaults[.hideShorts], video.short {
|
||||
return false
|
||||
}
|
||||
|
||||
if !watchesIDs.contains(video.videoID) {
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user