Feature/3124 release preparation

This commit is contained in:
Frank Rotermund
2022-06-08 13:04:21 +00:00
parent 2a2b0cd134
commit 00fb1d0f01
15 changed files with 184 additions and 22 deletions
@@ -64,6 +64,11 @@ struct DeveloperSettingsView: View {
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
.font(.system(size: 17))
}
Button(action: { _ = unmarkBannerVersion(mxSession: session) }) {
Text(NSLocalizedString("bwi_settings_developer_unmark_banner", tableName: "Bwi", comment: ""))
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
.font(.system(size: 17))
}
}
.navigationTitle(NSLocalizedString("bwi_settings_developer", tableName: "Vector", comment: ""))
.navigationBarTitleDisplayMode(.inline)
@@ -112,3 +117,17 @@ fileprivate func unrestrictUser(mxSession: MXSession?) -> Bool {
AccountRestrictionService(mxSession: mxSession).updateRestriction(roomAccess: false, addressListAccess: false)
return true
}
fileprivate func unmarkBannerVersion(mxSession: MXSession?) -> Bool {
guard let mxSession = mxSession else {
return false
}
// NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
_ = FeatureBannerVisibilityService(mxSession: mxSession).markAsUnread(version: version)
}
return true
}