From 70d821fe5d5a15859e00b87de0bb865771f8535a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20F=C3=B6rster?= Date: Tue, 20 Aug 2024 13:18:32 +0200 Subject: [PATCH 1/3] use correct systemImage for the Subscribe button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Toni Förster --- Shared/Channels/ChannelVideosView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared/Channels/ChannelVideosView.swift b/Shared/Channels/ChannelVideosView.swift index dc7e581b..50645ca0 100644 --- a/Shared/Channels/ChannelVideosView.swift +++ b/Shared/Channels/ChannelVideosView.swift @@ -380,7 +380,7 @@ struct ChannelVideosView: View { navigation.sidebarSectionChanged.toggle() } } label: { - Label("Subscribe", systemImage: "circle") + Label("Subscribe", systemImage: "star.circle") .help("Subscribe") #if os(iOS) .labelStyle(.automatic) From f3c876acf69ece6f17b0595448e68abf1eb4c5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20F=C3=B6rster?= Date: Tue, 20 Aug 2024 14:00:43 +0200 Subject: [PATCH 2/3] VideoDetails: open channel when touching the logo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The touch was consumed by the double touch action and the channel did not open. Signed-off-by: Toni Förster --- Shared/Player/Video Details/VideoDetails.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Shared/Player/Video Details/VideoDetails.swift b/Shared/Player/Video Details/VideoDetails.swift index 2656ee2d..246c8dcb 100644 --- a/Shared/Player/Video Details/VideoDetails.swift +++ b/Shared/Player/Video Details/VideoDetails.swift @@ -47,6 +47,9 @@ struct VideoDetails: View { .frame(width: 40, height: 40) .buttonStyle(.plain) .padding(.trailing, 5) + .simultaneousGesture( + TapGesture() // Ensures the button tap is recognized + ) VStack(alignment: .leading, spacing: 2) { HStack { @@ -209,9 +212,8 @@ struct VideoDetails: View { .contentShape(Rectangle()) .padding(.horizontal, 16) #if !os(tvOS) - .tapRecognizer( - tapSensitivity: 0.2, - doubleTapAction: { + .simultaneousGesture( // Simultaneous gesture to prioritize button tap + TapGesture(count: 2).onEnded { withAnimation(.default) { fullScreen.toggle() } From 0e8436ab403b724ad9273eefb0f4102179868a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20F=C3=B6rster?= Date: Tue, 20 Aug 2024 14:13:46 +0200 Subject: [PATCH 3/3] VideoDetails: click on channel name opens channel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Toni Förster --- Shared/Player/Video Details/VideoDetails.swift | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Shared/Player/Video Details/VideoDetails.swift b/Shared/Player/Video Details/VideoDetails.swift index 246c8dcb..b75be316 100644 --- a/Shared/Player/Video Details/VideoDetails.swift +++ b/Shared/Player/Video Details/VideoDetails.swift @@ -47,9 +47,12 @@ struct VideoDetails: View { .frame(width: 40, height: 40) .buttonStyle(.plain) .padding(.trailing, 5) - .simultaneousGesture( - TapGesture() // Ensures the button tap is recognized - ) + // TODO: when setting tvOS minimum to 16, the platform modifier can be removed + #if !os(tvOS) + .simultaneousGesture( + TapGesture() // Ensures the button tap is recognized + ) + #endif VStack(alignment: .leading, spacing: 2) { HStack { @@ -58,6 +61,14 @@ struct VideoDetails: View { .font(.subheadline) .fontWeight(.semibold) .lineLimit(1) + // TODO: when setting tvOS minimum to 16, the platform modifier can be removed + #if !os(tvOS) + .onTapGesture { + guard let channel = video?.channel else { return } + NavigationModel.shared.openChannel(channel, navigationStyle: .sidebar) + } + .accessibilityAddTraits(.isButton) + #endif } else if model.videoBeingOpened != nil { Text("Yattee") .font(.subheadline) @@ -211,6 +222,7 @@ struct VideoDetails: View { .frame(maxWidth: .infinity, alignment: .leading) .contentShape(Rectangle()) .padding(.horizontal, 16) + // TODO: when setting tvOS minimum to 16, the platform modifier can be removed #if !os(tvOS) .simultaneousGesture( // Simultaneous gesture to prioritize button tap TapGesture(count: 2).onEnded {