mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
Fix composer text coloration
This commit is contained in:
@@ -117,6 +117,11 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
|
||||
self.textView.tintColor = ThemeService.shared.theme.tintColor;
|
||||
self.textView.placeholderColor = ThemeService.shared.theme.textTertiaryColor;
|
||||
self.textView.showsVerticalScrollIndicator = NO;
|
||||
|
||||
// Trigger textView redraw using proper color/font.
|
||||
NSAttributedString *newText = self.textView.attributedText;
|
||||
self.textView.attributedText = nil;
|
||||
self.textView.attributedText = newText;
|
||||
|
||||
self.textView.keyboardAppearance = ThemeService.shared.theme.keyboardAppearance;
|
||||
if (self.textView.isFirstResponder)
|
||||
@@ -162,7 +167,11 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
|
||||
|
||||
- (void)setAttributedTextMessage:(NSAttributedString *)attributedTextMessage
|
||||
{
|
||||
self.textView.attributedText = attributedTextMessage;
|
||||
NSMutableAttributedString *mutableTextMessage = [[NSMutableAttributedString alloc] initWithAttributedString:attributedTextMessage];
|
||||
[mutableTextMessage addAttributes:@{ NSForegroundColorAttributeName: ThemeService.shared.theme.textPrimaryColor,
|
||||
NSFontAttributeName: self.textDefaultFont }
|
||||
range:NSMakeRange(0, mutableTextMessage.length)];
|
||||
self.textView.attributedText = mutableTextMessage;
|
||||
[self updateUIWithAttributedTextMessage:attributedTextMessage animated:YES];
|
||||
[self textViewDidChange:self.textView];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user