mirror of
https://github.com/yattee/yattee.git
synced 2025-11-24 10:18:16 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user