commit a96b0f3b0bbf46cead8cba8201b8a0e3ddb93594 parent ed13c1a28ab03969e1cca22cc9ffe9a7e007f639 Author: Marc Stibane <marc@taler.net> Date: Sun, 4 Feb 2024 14:58:29 +0100 githash 7 chars Diffstat:
| M | TalerWallet1/Views/Settings/AboutView.swift | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Views/Settings/AboutView.swift b/TalerWallet1/Views/Settings/AboutView.swift @@ -52,7 +52,12 @@ struct AboutView: View { Group { if showGitHash { SettingsItem(name: "Wallet-Core Git", id1: "wallet-coreG") { - Text(verbatim: "\(walletCore.versionInfo?.implementationGitHash ?? "unknown")") + if let gitHash = walletCore.versionInfo?.implementationGitHash { + let index = gitHash.index(gitHash.startIndex, offsetBy: 7) + Text(gitHash[..<index]) + } else { + Text(verbatim: "unknown") + } } } else { SettingsItem(name: "Wallet-Core Version", id1: "wallet-coreV") {