1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 13:50:32 +05:30

Minor performance improvement

This commit is contained in:
Arkadiusz Fal 2023-04-22 10:55:36 +02:00
parent b59baa6fab
commit 8ef016d792
2 changed files with 3 additions and 3 deletions

View File

@ -181,7 +181,7 @@ struct PlayerControls: View {
#endif #endif
} }
} }
.opacity(model.presentingControls ? 1 : 0) .opacity(model.presentingControls && !player.availableStreams.isEmpty ? 1 : 0)
} }
} }
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)

View File

@ -348,7 +348,7 @@ struct VideoCell: View {
DetailBadge(text: video.author, style: .prominent) DetailBadge(text: video.author, style: .prominent)
.foregroundColor(.primary) .foregroundColor(.primary)
} else { } else {
Text(video.channel.name) Text(verbatim: video.channel.name)
.fontWeight(.semibold) .fontWeight(.semibold)
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
@ -473,7 +473,7 @@ struct VideoCell: View {
} }
private func videoDetail(_ text: String, lineLimit: Int = 1) -> some View { private func videoDetail(_ text: String, lineLimit: Int = 1) -> some View {
Text(text) Text(verbatim: text)
.fontWeight(.bold) .fontWeight(.bold)
.lineLimit(lineLimit) .lineLimit(lineLimit)
.truncationMode(.middle) .truncationMode(.middle)