diff --git a/Model/Video.swift b/Model/Video.swift index 522735f7..11966950 100644 --- a/Model/Video.swift +++ b/Model/Video.swift @@ -134,11 +134,9 @@ struct Video: Identifiable, Equatable, Hashable { } var dislikesCount: String? { - guard (dislikes ?? 0) > 0 else { - return nil - } + guard let dislikes else { return nil } - return dislikes?.formattedAsAbbreviation() + return dislikes.formattedAsAbbreviation() } func thumbnailURL(quality: Thumbnail.Quality) -> URL? { diff --git a/Shared/Player/Video Details/VideoDetails.swift b/Shared/Player/Video Details/VideoDetails.swift index 0b6afa24..4fead512 100644 --- a/Shared/Player/Video Details/VideoDetails.swift +++ b/Shared/Player/Video Details/VideoDetails.swift @@ -30,6 +30,7 @@ struct VideoDetails: View { @EnvironmentObject private var recents @EnvironmentObject private var subscriptions + @Default(.enableReturnYouTubeDislike) private var enableReturnYouTubeDislike @Default(.detailsToolbarPosition) private var detailsToolbarPosition @Default(.playerSidebar) private var playerSidebar @@ -210,7 +211,7 @@ struct VideoDetails: View { } } - if Defaults[.enableReturnYouTubeDislike] { + if enableReturnYouTubeDislike { Image(systemName: "hand.thumbsdown") if let dislikes = video?.dislikesCount, player.videoBeingOpened.isNil {