mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix dislikes counter
This commit is contained in:
parent
2dbc50dc71
commit
a1ade66594
@ -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? {
|
||||
|
@ -30,6 +30,7 @@ struct VideoDetails: View {
|
||||
@EnvironmentObject<RecentsModel> private var recents
|
||||
@EnvironmentObject<SubscriptionsModel> 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user