Performance improvements

This commit is contained in:
Arkadiusz Fal
2022-08-23 23:14:13 +02:00
parent 4dbdd00829
commit 9197309115
5 changed files with 33 additions and 44 deletions

View File

@@ -103,7 +103,7 @@ struct VideoDescription: View {
}
func updateUIView(_: UIViewType, context _: Context) {
customizeLabel()
updatePreferredMaxLayoutWidth()
}
func customizeLabel() {
@@ -143,6 +143,10 @@ struct VideoDescription: View {
}
}
}
func updatePreferredMaxLayoutWidth() {
label.preferredMaxLayoutWidth = (detailsSize?.width ?? 330) - 30
}
}
#endif