Shortened variables

This commit is contained in:
Lumaa 2024-01-27 08:56:54 +01:00
parent 9ef5101d70
commit 2a89a534fc
2 changed files with 5 additions and 1 deletions

View File

@ -14,3 +14,7 @@ struct ThreadedApp: App {
} }
} }
} }
extension AppInfo {
static var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown"
}

View File

@ -7,7 +7,7 @@ struct AboutView: View {
var body: some View { var body: some View {
List { List {
Section(footer: Text("about.version-\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown")")) { Section(footer: Text("about.version-\(AppInfo.appVersion)")) {
NavigationLink { NavigationLink {
aboutApp aboutApp
} label: { } label: {