Channels performance improvements

Add settings:
Show channel avatars in channels lists
Show channel avatars in videos lists

Fix #508
This commit is contained in:
Arkadiusz Fal
2023-07-22 19:02:59 +02:00
parent 37a96a01db
commit 3c9e04d243
14 changed files with 81 additions and 71 deletions

View File

@@ -167,6 +167,7 @@ struct ControlsBar: View {
channel: model.videoForDisplay?.channel,
video: model.videoForDisplay
)
.id("channel-avatar-\(model.videoForDisplay?.id ?? "")")
.frame(width: barHeight - 10, height: barHeight - 10)
}
.contextMenu { contextMenu }
@@ -176,12 +177,13 @@ struct ControlsBar: View {
channel: model.videoForDisplay?.channel,
video: model.videoForDisplay
)
.id("channel-avatar-\(model.videoForDisplay?.id ?? "")")
#if !os(tvOS)
.highPriorityGesture(playerButtonDoubleTapGesture != .nothing ? doubleTapGesture : nil)
.gesture(playerButtonSingleTapGesture != .nothing ? singleTapGesture : nil)
.highPriorityGesture(playerButtonDoubleTapGesture != .nothing ? doubleTapGesture : nil)
.gesture(playerButtonSingleTapGesture != .nothing ? singleTapGesture : nil)
#endif
.frame(width: barHeight - 10, height: barHeight - 10)
.contextMenu { contextMenu }
.frame(width: barHeight - 10, height: barHeight - 10)
.contextMenu { contextMenu }
}
if expansionState == .full {