From 59b8ae3da9a6de5580ea11903b73b7d334a17ad9 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Nov 2021 11:48:06 +0100 Subject: [PATCH 1/2] SettingsVC: Update about section footer text. --- .../Modules/Settings/SettingsViewController.m | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 7ecfcb533..e7b8be3b3 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]; @@ -1410,6 +1405,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 From 9b815b78c2b3ecb24d1a4e8dbff20723fbe2de28 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 4 Nov 2021 11:50:06 +0100 Subject: [PATCH 2/2] Add changes --- changelog.d/5090.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5090.change 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