Display build number next to version

This commit is contained in:
Arkadiusz Fal 2021-12-01 23:54:09 +01:00
parent 9f5e9ea237
commit 45c917160e

View File

@ -36,7 +36,7 @@ struct PlayerControlsView<Content: View>: View {
.foregroundColor(model.currentItem.isNil ? .secondary : .accentColor)
.lineLimit(1)
Text(model.currentItem?.video?.author ?? "Yattee v\(appVersion)")
Text(model.currentItem?.video?.author ?? "Yattee v\(appVersion) (build \(appBuild))")
.fontWeight(model.currentItem.isNil ? .light : .bold)
.font(.system(size: 10))
.foregroundColor(.secondary)
@ -115,6 +115,10 @@ struct PlayerControlsView<Content: View>: View {
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "unknown"
}
private var appBuild: String {
Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "unknown"
}
private var progressViewValue: Double {
[model.time?.seconds, model.videoDuration].compactMap { $0 }.min() ?? 0
}