mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
MESSENGER-5610 change profile hint
This commit is contained in:
@@ -878,6 +878,7 @@ SSOAuthenticationPresenterDelegate>
|
||||
[self.tableView registerClass:MXKTableViewCellWithLabelAndTextField.class forCellReuseIdentifier:[MXKTableViewCellWithLabelAndTextField defaultReuseIdentifier]];
|
||||
[self.tableView registerClass:MXKTableViewCellWithLabelAndSwitch.class forCellReuseIdentifier:[MXKTableViewCellWithLabelAndSwitch defaultReuseIdentifier]];
|
||||
[self.tableView registerClass:MXKTableViewCellWithLabelAndMXKImageView.class forCellReuseIdentifier:[MXKTableViewCellWithLabelAndMXKImageView defaultReuseIdentifier]];
|
||||
[self.tableView registerClass:BWITableViewCellWithLabelAndMXKImageView.class forCellReuseIdentifier:[BWITableViewCellWithLabelAndMXKImageView defaultReuseIdentifier]]; // bwi: 5610
|
||||
[self.tableView registerClass:TableViewCellWithPhoneNumberTextField.class forCellReuseIdentifier:[TableViewCellWithPhoneNumberTextField defaultReuseIdentifier]];
|
||||
[self.tableView registerNib:MXKTableViewCellWithTextView.nib forCellReuseIdentifier:[MXKTableViewCellWithTextView defaultReuseIdentifier]];
|
||||
[self.tableView registerNib:SectionFooterView.nib forHeaderFooterViewReuseIdentifier:[SectionFooterView defaultReuseIdentifier]];
|
||||
@@ -2004,13 +2005,20 @@ SSOAuthenticationPresenterDelegate>
|
||||
|
||||
if (row == USER_SETTINGS_PROFILE_PICTURE_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndMXKImageView *profileCell = [tableView dequeueReusableCellWithIdentifier:[MXKTableViewCellWithLabelAndMXKImageView defaultReuseIdentifier] forIndexPath:indexPath];
|
||||
BWITableViewCellWithLabelAndMXKImageView *profileCell = [tableView dequeueReusableCellWithIdentifier:[BWITableViewCellWithLabelAndMXKImageView defaultReuseIdentifier] forIndexPath:indexPath];
|
||||
|
||||
// bwi: keep reference to cell image view
|
||||
bwiProfileImage = profileCell.mxkImageView;
|
||||
|
||||
profileCell.mxkLabelLeadingConstraint.constant = tableView.vc_separatorInset.left;
|
||||
profileCell.mxkImageViewTrailingConstraint.constant = 10;
|
||||
|
||||
profileCell.bwiHintLeadingConstraint.constant = tableView.vc_separatorInset.left;
|
||||
if(![BWIBuildSettings.shared showChangeProfilePictureHint] || ![BWIBuildSettings.shared isFederationEnabled]) {
|
||||
// Change constraints to get the default spacing when no hint is shown
|
||||
profileCell.bwiHintTopConstraint.constant = 0;
|
||||
profileCell.bwiHintBottomConstraint.constant = 5.5;
|
||||
}
|
||||
|
||||
profileCell.mxkImageViewWidthConstraint.constant = profileCell.mxkImageViewHeightConstraint.constant = 30;
|
||||
profileCell.mxkImageViewDisplayBoxType = MXKTableViewCellDisplayBoxTypeCircle;
|
||||
@@ -2026,6 +2034,13 @@ SSOAuthenticationPresenterDelegate>
|
||||
profileCell.accessibilityIdentifier=@"SettingsVCProfilPictureStaticText";
|
||||
profileCell.mxkLabel.textColor = ThemeService.shared.theme.textPrimaryColor;
|
||||
|
||||
if([BWIBuildSettings.shared showChangeProfilePictureHint] && [BWIBuildSettings.shared isFederationEnabled]) {
|
||||
profileCell.bwiHint.text = [BWIL10n settingsChangeProfileAvatarHint];
|
||||
profileCell.bwiHint.textColor = ThemeService.shared.theme.textSecondaryColor;
|
||||
} else {
|
||||
profileCell.bwiHint.text = nil;
|
||||
}
|
||||
|
||||
// if the user defines a new avatar
|
||||
if (newAvatarImage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user