reskin: kill dead code around placeholderTextColor

#2174
This commit is contained in:
manuroe
2019-01-23 12:03:55 +01:00
parent d5255729d9
commit a88484d610
5 changed files with 89 additions and 129 deletions
@@ -60,11 +60,8 @@
self.passWordTextField.placeholder = NSLocalizedStringFromTable(@"auth_new_password_placeholder", @"Vector", nil);
self.repeatPasswordTextField.placeholder = NSLocalizedStringFromTable(@"auth_repeat_new_password_placeholder", @"Vector", nil);
if (ThemeService.shared.theme.placeholderTextColor)
{
// Apply placeholder color
[self customizeViewRendering];
}
// Apply placeholder color
[self customizeViewRendering];
}
- (void)destroy
@@ -116,27 +113,24 @@
[self.nextStepButton.layer setCornerRadius:5];
self.nextStepButton.clipsToBounds = YES;
self.nextStepButton.backgroundColor = ThemeService.shared.theme.tintColor;
if (ThemeService.shared.theme.placeholderTextColor)
if (self.emailTextField.placeholder)
{
if (self.emailTextField.placeholder)
{
self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.emailTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
if (self.passWordTextField.placeholder)
{
self.passWordTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.passWordTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
if (self.repeatPasswordTextField.placeholder)
{
self.repeatPasswordTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.repeatPasswordTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.emailTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
if (self.passWordTextField.placeholder)
{
self.passWordTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.passWordTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
if (self.repeatPasswordTextField.placeholder)
{
self.repeatPasswordTextField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.repeatPasswordTextField.placeholder
attributes:@{NSForegroundColorAttributeName: ThemeService.shared.theme.placeholderTextColor}];
}
}