add version string to profile/settings view

This commit is contained in:
Satindar Dhillon 2022-03-21 11:19:30 -07:00
parent 13a700e3c9
commit 52f04ebee6

View file

@ -11,6 +11,14 @@ final class ProfileContainerViewModel: ObservableObject {
var subscriptions = Set<AnyCancellable>()
var appVersionString: String {
if let appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String {
return "Omnivore Version \(appVersion)"
} else {
return ""
}
}
func loadProfileData(dataService: DataService) {
dataService.viewerPublisher().sink(
receiveCompletion: { _ in },
@ -81,7 +89,7 @@ struct ProfileView: View {
#endif
}
Section {
Section(footer: Text(viewModel.appVersionString)) {
if FeatureFlag.showAccountDeletion {
NavigationLink(
destination: ManageAccountView(handleAccountDeletion: {