From e43eddc8e7ffce25f1af9d2e4fc1d187382baff7 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 23 Nov 2025 14:34:29 +0100 Subject: [PATCH] Fix iOS menu text disappearing in ChannelVideosView Applied ZStack overlay fix to the channel menu in ChannelVideosView where the channel name, avatar, subscriber count, and view count would disappear when tapping the menu. Uses the same pattern: - Visible static label with channel info stays on screen - Invisible Menu overlay with .opacity(0) handles interactions - Prevents text/avatar disappearing and resizing animations --- Shared/Channels/ChannelVideosView.swift | 76 ++++++++++++++++++------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/Shared/Channels/ChannelVideosView.swift b/Shared/Channels/ChannelVideosView.swift index feccb472..6c18c230 100644 --- a/Shared/Channels/ChannelVideosView.swift +++ b/Shared/Channels/ChannelVideosView.swift @@ -259,26 +259,7 @@ struct ChannelVideosView: View { #if !os(tvOS) var channelMenu: some View { - Menu { - if let channel = presentedChannel { - contentTypePicker - Section { - subscriptionToggleButton - FavoriteButton(item: FavoriteItem(section: .channel(accounts.app.appType.rawValue, channel.id, channel.name))) - } - - if subscriptions.isSubscribing(channel.id) { - toggleWatchedButton - } - - ListingStyleButtons(listingStyle: $channelPlaylistListingStyle) - - Section { - HideWatchedButtons() - HideShortsButtons() - } - } - } label: { + ZStack { HStack(spacing: 12) { thumbnail @@ -311,6 +292,61 @@ struct ChannelVideosView: View { .imageScale(.small) } .frame(maxWidth: 320) + + Menu { + if let channel = presentedChannel { + contentTypePicker + Section { + subscriptionToggleButton + FavoriteButton(item: FavoriteItem(section: .channel(accounts.app.appType.rawValue, channel.id, channel.name))) + } + + if subscriptions.isSubscribing(channel.id) { + toggleWatchedButton + } + + ListingStyleButtons(listingStyle: $channelPlaylistListingStyle) + + Section { + HideWatchedButtons() + HideShortsButtons() + } + } + } label: { + HStack(spacing: 12) { + thumbnail + + VStack(alignment: .leading) { + Text(presentedChannel?.name ?? "Channel") + .font(.headline) + .foregroundColor(.primary) + .layoutPriority(1) + .frame(minWidth: 160, alignment: .leading) + + Group { + HStack(spacing: 12) { + subscriptionsLabel + + if presentedChannel?.verified ?? false { + Image(systemName: "checkmark.seal.fill") + .imageScale(.small) + } + + viewsLabel + } + .frame(minWidth: 160, alignment: .leading) + } + .font(.caption2.bold()) + .foregroundColor(.secondary) + } + + Image(systemName: "chevron.down.circle.fill") + .foregroundColor(.accentColor) + .imageScale(.small) + } + .frame(maxWidth: 320) + .opacity(0) + } } } #endif