mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Channels performance improvements
Add settings: Show channel avatars in channels lists Show channel avatars in videos lists Fix #508
This commit is contained in:
@@ -50,6 +50,8 @@ struct RecentNavigationLink<DestinationContent: View>: View {
|
||||
var recents = RecentsModel.shared
|
||||
@ObservedObject private var navigation = NavigationModel.shared
|
||||
|
||||
@Default(.showChannelAvatarInChannelsLists) private var showChannelAvatarInChannelsLists
|
||||
|
||||
var recent: RecentItem
|
||||
var systemImage: String?
|
||||
let destination: DestinationContent
|
||||
@@ -71,9 +73,10 @@ struct RecentNavigationLink<DestinationContent: View>: View {
|
||||
HStack {
|
||||
if recent.type == .channel,
|
||||
let channel = recent.channel,
|
||||
channel.thumbnailURLOrCached != nil
|
||||
showChannelAvatarInChannelsLists
|
||||
{
|
||||
ChannelAvatarView(channel: channel, subscribedBadge: false)
|
||||
.id("channel-avatar-\(channel.id)")
|
||||
.frame(width: Constants.sidebarChannelThumbnailSize, height: Constants.sidebarChannelThumbnailSize)
|
||||
|
||||
Text(channel.name)
|
||||
|
Reference in New Issue
Block a user