mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
reskin: Create ThemeService.shared
This commit is contained in:
@@ -334,12 +334,12 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
- (void)userInterfaceThemeDidChange
|
||||
{
|
||||
[ThemeService.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
|
||||
[ThemeService.shared.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
|
||||
|
||||
self.activityIndicator.backgroundColor = ThemeService.theme.overlayBackgroundColor;
|
||||
self.activityIndicator.backgroundColor = ThemeService.shared.theme.overlayBackgroundColor;
|
||||
|
||||
// Check the table view style to select its bg color.
|
||||
self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? ThemeService.theme.backgroundColor : ThemeService.theme.headerBackgroundColor);
|
||||
self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? ThemeService.shared.theme.backgroundColor : ThemeService.shared.theme.headerBackgroundColor);
|
||||
self.view.backgroundColor = self.tableView.backgroundColor;
|
||||
|
||||
if (self.tableView.dataSource)
|
||||
@@ -350,7 +350,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return ThemeService.theme.statusBarStyle;
|
||||
return ThemeService.shared.theme.statusBarStyle;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
@@ -955,30 +955,30 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
// Crypto information
|
||||
NSMutableAttributedString *cryptoInformationString = [[NSMutableAttributedString alloc]
|
||||
initWithString:NSLocalizedStringFromTable(@"settings_crypto_device_name", @"Vector", nil)
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.theme.textPrimaryColor,
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:17]}];
|
||||
[cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:account.device.displayName ? account.device.displayName : @""
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.theme.textPrimaryColor,
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:17]}]];
|
||||
|
||||
[cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:NSLocalizedStringFromTable(@"settings_crypto_device_id", @"Vector", nil)
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.theme.textPrimaryColor,
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:17]}]];
|
||||
[cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:account.device.deviceId ? account.device.deviceId : @""
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.theme.textPrimaryColor,
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:17]}]];
|
||||
|
||||
[cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:NSLocalizedStringFromTable(@"settings_crypto_device_key", @"Vector", nil)
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.theme.textPrimaryColor,
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:17]}]];
|
||||
NSString *fingerprint = account.mxSession.crypto.deviceEd25519Key;
|
||||
[cryptoInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:fingerprint ? fingerprint : @""
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.theme.textPrimaryColor,
|
||||
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: [UIFont boldSystemFontOfSize:17]}]];
|
||||
|
||||
return cryptoInformationString;
|
||||
@@ -1295,12 +1295,12 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
cell.mxkTextFieldLeadingConstraint.constant = 16;
|
||||
cell.mxkTextFieldTrailingConstraint.constant = 15;
|
||||
|
||||
cell.mxkLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
cell.mxkLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
cell.mxkTextField.userInteractionEnabled = YES;
|
||||
cell.mxkTextField.borderStyle = UITextBorderStyleNone;
|
||||
cell.mxkTextField.textAlignment = NSTextAlignmentRight;
|
||||
cell.mxkTextField.textColor = ThemeService.theme.textSecondaryColor;
|
||||
cell.mxkTextField.textColor = ThemeService.shared.theme.textSecondaryColor;
|
||||
cell.mxkTextField.font = [UIFont systemFontOfSize:16];
|
||||
cell.mxkTextField.placeholder = nil;
|
||||
|
||||
@@ -1322,7 +1322,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
cell.mxkLabelLeadingConstraint.constant = cell.separatorInset.left;
|
||||
cell.mxkSwitchTrailingConstraint.constant = 15;
|
||||
|
||||
cell.mxkLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
cell.mxkLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
[cell.mxkSwitch removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1348,7 +1348,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
}
|
||||
cell.textLabel.accessibilityIdentifier = nil;
|
||||
cell.textLabel.font = [UIFont systemFontOfSize:17];
|
||||
cell.textLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
return cell;
|
||||
}
|
||||
@@ -1357,7 +1357,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
{
|
||||
MXKTableViewCellWithTextView *textViewCell = [tableView dequeueReusableCellWithIdentifier:[MXKTableViewCellWithTextView defaultReuseIdentifier] forIndexPath:indexPath];
|
||||
|
||||
textViewCell.mxkTextView.textColor = ThemeService.theme.textPrimaryColor;
|
||||
textViewCell.mxkTextView.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
textViewCell.mxkTextView.font = [UIFont systemFontOfSize:17];
|
||||
textViewCell.mxkTextView.backgroundColor = [UIColor clearColor];
|
||||
textViewCell.mxkTextViewLeadingConstraint.constant = tableView.separatorInset.left;
|
||||
@@ -1404,7 +1404,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
[signOutCell.mxkButton setTitle:title forState:UIControlStateNormal];
|
||||
[signOutCell.mxkButton setTitle:title forState:UIControlStateHighlighted];
|
||||
[signOutCell.mxkButton setTintColor:ThemeService.theme.tintColor];
|
||||
[signOutCell.mxkButton setTintColor:ThemeService.shared.theme.tintColor];
|
||||
signOutCell.mxkButton.titleLabel.font = [UIFont systemFontOfSize:17];
|
||||
|
||||
[signOutCell.mxkButton removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -1436,7 +1436,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
profileCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_profile_picture", @"Vector", nil);
|
||||
profileCell.accessibilityIdentifier=@"SettingsVCProfilPictureStaticText";
|
||||
profileCell.mxkLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
profileCell.mxkLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
// if the user defines a new avatar
|
||||
if (newAvatarImage)
|
||||
@@ -1527,11 +1527,11 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
{
|
||||
newEmailCell.mxkLabel.text = nil;
|
||||
newEmailCell.mxkTextField.placeholder = NSLocalizedStringFromTable(@"settings_email_address_placeholder", @"Vector", nil);
|
||||
if (ThemeService.theme.placeholderTextColor)
|
||||
if (ThemeService.shared.theme.placeholderTextColor)
|
||||
{
|
||||
newEmailCell.mxkTextField.attributedPlaceholder = [[NSAttributedString alloc]
|
||||
initWithString:newEmailCell.mxkTextField.placeholder
|
||||
attributes:@{NSForegroundColorAttributeName: ThemeService.theme.placeholderTextColor}];
|
||||
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
|
||||
}
|
||||
newEmailCell.mxkTextField.text = newEmailTextField.text;
|
||||
newEmailCell.mxkTextField.userInteractionEnabled = YES;
|
||||
@@ -1559,7 +1559,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
newEmailTextField = newEmailCell.mxkTextField;
|
||||
}
|
||||
|
||||
UIImage *accessoryViewImage = [MXKTools paintImage:[UIImage imageNamed:@"plus_icon"] withColor:ThemeService.theme.tintColor];
|
||||
UIImage *accessoryViewImage = [MXKTools paintImage:[UIImage imageNamed:@"plus_icon"] withColor:ThemeService.shared.theme.tintColor];
|
||||
newEmailCell.accessoryView = [[UIImageView alloc] initWithImage:accessoryViewImage];
|
||||
}
|
||||
|
||||
@@ -1652,7 +1652,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
newPhoneNumberCell = newPhoneCell;
|
||||
}
|
||||
|
||||
UIImage *accessoryViewImage = [MXKTools paintImage:[UIImage imageNamed:@"plus_icon"] withColor:ThemeService.theme.tintColor];
|
||||
UIImage *accessoryViewImage = [MXKTools paintImage:[UIImage imageNamed:@"plus_icon"] withColor:ThemeService.shared.theme.tintColor];
|
||||
newPhoneCell.accessoryView = [[UIImageView alloc] initWithImage:accessoryViewImage];
|
||||
|
||||
cell = newPhoneCell;
|
||||
@@ -1672,7 +1672,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
else if (row == userSettingsNightModeSepIndex)
|
||||
{
|
||||
UITableViewCell *sepCell = [[UITableViewCell alloc] init];
|
||||
sepCell.backgroundColor = ThemeService.theme.headerBackgroundColor;
|
||||
sepCell.backgroundColor = ThemeService.shared.theme.headerBackgroundColor;
|
||||
|
||||
cell = sepCell;
|
||||
}
|
||||
@@ -1695,7 +1695,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_enable_push_notif", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = account.isPushKitNotificationActive;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePushNotifications:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1707,7 +1707,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_show_decrypted_content", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showDecryptedContentInNotifications;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = account.isPushKitNotificationActive;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleShowDecodedContent:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1733,7 +1733,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_pin_rooms_with_missed_notif", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePinRoomsWithMissedNotif:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1745,7 +1745,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_pin_rooms_with_unread", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.pinRoomsWithUnreadMessagesOnHome;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePinRoomsWithUnread:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1759,7 +1759,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_enable_callkit", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = [MXKAppSettings standardAppSettings].isCallKitEnabled;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleCallKit:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1796,7 +1796,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:language];
|
||||
languageDescription = [languageDescription capitalizedStringWithLocale:locale];
|
||||
|
||||
cell.textLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
cell.textLabel.text = NSLocalizedStringFromTable(@"settings_ui_language", @"Vector", nil);
|
||||
cell.detailTextLabel.text = languageDescription;
|
||||
@@ -1833,7 +1833,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
@"Vector",
|
||||
nil);
|
||||
|
||||
cell.textLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
cell.textLabel.text = NSLocalizedStringFromTable(@"settings_ui_theme", @"Vector", nil);
|
||||
cell.detailTextLabel.text = i18nTheme;
|
||||
@@ -1864,7 +1864,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
labelAndSwitchCell.mxkLabel.numberOfLines = 0;
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_contacts_discover_matrix_users", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = [MXKAppSettings standardAppSettings].syncLocalContacts;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleLocalContactsSync:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1882,7 +1882,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
NSLocale *local = [[NSLocale alloc] initWithLocaleIdentifier:[[NSBundle mainBundle] preferredLocalizations][0]];
|
||||
NSString *countryName = [local displayNameForKey:NSLocaleCountryCode value:countryCode];
|
||||
|
||||
cell.textLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
cell.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
cell.textLabel.text = NSLocalizedStringFromTable(@"settings_contacts_phonebook_country", @"Vector", nil);
|
||||
cell.detailTextLabel.text = countryName;
|
||||
@@ -1973,7 +1973,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
sendCrashReportCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_send_crash_report", @"Vector", nil);
|
||||
sendCrashReportCell.mxkSwitch.on = RiotSettings.shared.enableCrashReport;
|
||||
sendCrashReportCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
sendCrashReportCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
sendCrashReportCell.mxkSwitch.enabled = YES;
|
||||
[sendCrashReportCell.mxkSwitch addTarget:self action:@selector(toggleSendCrashReport:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -1985,7 +1985,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
enableRageShakeCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_enable_rageshake", @"Vector", nil);
|
||||
enableRageShakeCell.mxkSwitch.on = RiotSettings.shared.enableRageShake;
|
||||
enableRageShakeCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
enableRageShakeCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
enableRageShakeCell.mxkSwitch.enabled = YES;
|
||||
[enableRageShakeCell.mxkSwitch addTarget:self action:@selector(toggleEnableRageShake:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -2007,7 +2007,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
NSString *btnTitle = NSLocalizedStringFromTable(@"settings_mark_all_as_read", @"Vector", nil);
|
||||
[markAllBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateNormal];
|
||||
[markAllBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateHighlighted];
|
||||
[markAllBtnCell.mxkButton setTintColor:ThemeService.theme.tintColor];
|
||||
[markAllBtnCell.mxkButton setTintColor:ThemeService.shared.theme.tintColor];
|
||||
markAllBtnCell.mxkButton.titleLabel.font = [UIFont systemFontOfSize:17];
|
||||
|
||||
[markAllBtnCell.mxkButton removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -2032,7 +2032,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
NSString *btnTitle = NSLocalizedStringFromTable(@"settings_clear_cache", @"Vector", nil);
|
||||
[clearCacheBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateNormal];
|
||||
[clearCacheBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateHighlighted];
|
||||
[clearCacheBtnCell.mxkButton setTintColor:ThemeService.theme.tintColor];
|
||||
[clearCacheBtnCell.mxkButton setTintColor:ThemeService.shared.theme.tintColor];
|
||||
clearCacheBtnCell.mxkButton.titleLabel.font = [UIFont systemFontOfSize:17];
|
||||
|
||||
[clearCacheBtnCell.mxkButton removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -2057,7 +2057,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
NSString *btnTitle = NSLocalizedStringFromTable(@"settings_report_bug", @"Vector", nil);
|
||||
[reportBugBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateNormal];
|
||||
[reportBugBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateHighlighted];
|
||||
[reportBugBtnCell.mxkButton setTintColor:ThemeService.theme.tintColor];
|
||||
[reportBugBtnCell.mxkButton setTintColor:ThemeService.shared.theme.tintColor];
|
||||
reportBugBtnCell.mxkButton.titleLabel.font = [UIFont systemFontOfSize:17];
|
||||
|
||||
[reportBugBtnCell.mxkButton removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -2077,7 +2077,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
MXKAccount* account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
|
||||
labelAndSwitchCell.mxkSwitch.on = account.mxSession.syncWithLazyLoadOfRoomMembers;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleSyncWithLazyLoadOfRoomMembers:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -2089,7 +2089,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_create_conference_with_jitsi", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.createConferenceCallsWithJitsi;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleJitsiForConference:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -2103,7 +2103,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_e2e_encryption", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = (nil != session.crypto);
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleLabsEndToEndEncryption:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -2177,7 +2177,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_crypto_blacklist_unverified_devices", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = account.mxSession.crypto.globalBlacklistUnverifiedDevices;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleBlacklistUnverifiedDevices:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
@@ -2199,7 +2199,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
NSString *btnTitle = NSLocalizedStringFromTable(@"settings_crypto_export", @"Vector", nil);
|
||||
[exportKeysBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateNormal];
|
||||
[exportKeysBtnCell.mxkButton setTitle:btnTitle forState:UIControlStateHighlighted];
|
||||
[exportKeysBtnCell.mxkButton setTintColor:ThemeService.theme.tintColor];
|
||||
[exportKeysBtnCell.mxkButton setTintColor:ThemeService.shared.theme.tintColor];
|
||||
exportKeysBtnCell.mxkButton.titleLabel.font = [UIFont systemFontOfSize:17];
|
||||
|
||||
[exportKeysBtnCell.mxkButton removeTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -2334,7 +2334,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
{
|
||||
// Customize label style
|
||||
UITableViewHeaderFooterView *tableViewHeaderFooterView = (UITableViewHeaderFooterView*)view;
|
||||
tableViewHeaderFooterView.textLabel.textColor = ThemeService.theme.textPrimaryColor;
|
||||
tableViewHeaderFooterView.textLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
tableViewHeaderFooterView.textLabel.font = [UIFont systemFontOfSize:15];
|
||||
}
|
||||
}
|
||||
@@ -2362,15 +2362,15 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;
|
||||
{
|
||||
cell.backgroundColor = ThemeService.theme.backgroundColor;
|
||||
cell.backgroundColor = ThemeService.shared.theme.backgroundColor;
|
||||
|
||||
if (cell.selectionStyle != UITableViewCellSelectionStyleNone)
|
||||
{
|
||||
// Update the selected background view
|
||||
if (ThemeService.theme.selectedBackgroundColor)
|
||||
if (ThemeService.shared.theme.selectedBackgroundColor)
|
||||
{
|
||||
cell.selectedBackgroundView = [[UIView alloc] init];
|
||||
cell.selectedBackgroundView.backgroundColor = ThemeService.theme.selectedBackgroundColor;
|
||||
cell.selectedBackgroundView.backgroundColor = ThemeService.shared.theme.selectedBackgroundColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2473,7 +2473,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
|
||||
}];
|
||||
|
||||
leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon_pink" backgroundColor:ThemeService.theme.headerBackgroundColor patternSize:CGSizeMake(50, cellHeight) resourceSize:CGSizeMake(24, 24)];
|
||||
leaveAction.backgroundColor = [MXKTools convertImageToPatternColor:@"remove_icon_pink" backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(50, cellHeight) resourceSize:CGSizeMake(24, 24)];
|
||||
[actions insertObject:leaveAction atIndex:0];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user