diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index cee976ad2..0be7f5736 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -541,13 +541,8 @@ TableViewSectionsDelegate> sectionAbout.headerTitle = VectorL10n.settingsAbout; if (BuildSettings.settingsScreenShowAdvancedSettings) - { - sectionAbout.footerTitle = [NSString stringWithFormat:@"Element %@ (%@) / Olm %@\n%@\n%@", - AppInfo.current.appVersion.bundleShortVersion, - AppInfo.current.appVersion.bundleVersion, - [OLMKit versionString], - [MatrixKitL10n settingsConfigUserId:account.mxCredentials.userId], - [MatrixKitL10n settingsConfigHomeServer:account.mxCredentials.homeServer]]; + { + sectionAbout.footerTitle = [self buildAboutSectionFooterTitleWithAccount:account]; } [tmpSections addObject:sectionAbout]; @@ -1425,6 +1420,35 @@ TableViewSectionsDelegate> } } +- (NSString*)buildAboutSectionFooterTitleWithAccount:(MXKAccount*)account +{ + NSMutableString *footerText = [NSMutableString new]; + + AppInfo *appInfo = AppInfo.current; + + NSString *appName = appInfo.displayName; + NSString *appVersion = appInfo.appVersion.bundleShortVersion; + NSString *buildVersion = appInfo.appVersion.bundleVersion; + + NSString *appVersionInfo = [NSString stringWithFormat:@"%@ %@ (%@)", appName, appVersion, buildVersion]; + + NSString *loggedUserInfo = [MatrixKitL10n settingsConfigUserId:account.mxCredentials.userId]; + + NSString *homeserverInfo = [MatrixKitL10n settingsConfigHomeServer:account.mxCredentials.homeServer]; + + NSString *sdkVersionInfo = [NSString stringWithFormat:@"Matrix SDK %@", MatrixSDKVersion]; + + NSString *olmVersionInfo = [NSString stringWithFormat:@"OLM %@", [OLMKit versionString]]; + + [footerText appendFormat:@"%@\n", loggedUserInfo]; + [footerText appendFormat:@"%@\n", homeserverInfo]; + [footerText appendFormat:@"%@\n", appVersionInfo]; + [footerText appendFormat:@"%@\n", sdkVersionInfo]; + [footerText appendFormat:@"%@", olmVersionInfo]; + + return [footerText copy]; +} + #pragma mark - 3Pid Add - (void)showAuthenticationIfNeededForAdding:(MX3PIDMedium)medium withSession:(MXSession*)session completion:(void (^)(NSDictionary* authParams))completion diff --git a/changelog.d/5090.change b/changelog.d/5090.change new file mode 100644 index 000000000..c4d0c6cd2 --- /dev/null +++ b/changelog.d/5090.change @@ -0,0 +1 @@ +Settings: Update about section footer text. \ No newline at end of file