From 6994271eca4f750ea1edebfbc72c32baaf12b4d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20F=C3=B6rster?= Date: Sat, 25 Nov 2023 21:58:42 +0100 Subject: [PATCH] iOS - the description header is a button now --- .../Player/Video Details/VideoDetails.swift | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/Shared/Player/Video Details/VideoDetails.swift b/Shared/Player/Video Details/VideoDetails.swift index bf9afa76..428580c6 100644 --- a/Shared/Player/Video Details/VideoDetails.swift +++ b/Shared/Player/Video Details/VideoDetails.swift @@ -410,18 +410,34 @@ struct VideoDetails: View { } var descriptionHeader: some View { - HStack { - Text("Description".localized()) - Spacer() - Button { descriptionExpanded.toggle() - } label: { - Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down") - .imageScale(.small) + #if canImport(UIKit) + Button(action: { + descriptionExpanded.toggle() + }) { + HStack { + Text("Description".localized()) + Spacer() + Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down") + .imageScale(.small) + } + .padding(.horizontal) + .font(.caption) + .foregroundColor(.secondary) } - } - .padding(.horizontal) - .font(.caption) - .foregroundColor(.secondary) + #elseif canImport(AppKit) + HStack { + Text("Description".localized()) + Spacer() + Button { descriptionExpanded.toggle() + } label: { + Image(systemName: descriptionExpanded ? "chevron.up" : "chevron.down") + .imageScale(.small) + } + } + .padding(.horizontal) + .font(.caption) + .foregroundColor(.secondary) + #endif } var chaptersHeader: some View {