Composer Update - Typing and sending a message

This commit is contained in:
Gil Eluard
2021-03-15 14:27:59 +01:00
parent aa3aafb0b0
commit eefe1e2157
39 changed files with 1103 additions and 1210 deletions
+33 -3
View File
@@ -54,8 +54,8 @@
{
[super layoutSubviews];
self.roomDetailsIconImageView.image = self.roomDetailsIconImageView.image;
self.pictureView.layer.cornerRadius = self.pictureView.bounds.size.width / 2.;
if (self.superview)
{
// Force the title view layout by adding 2 new constraints on the UINavigationBarContentView instance.
@@ -84,7 +84,7 @@
self.backgroundColor = UIColor.clearColor;
self.displayNameTextField.textColor = (self.mxRoom.summary.displayname.length ? ThemeService.shared.theme.textPrimaryColor : ThemeService.shared.theme.textSecondaryColor);
self.roomDetailsIconImageView.tintColor = ThemeService.shared.theme.textPrimaryColor;
self.typingLabel.textColor = ThemeService.shared.theme.textSecondaryColor;
}
- (void)setRoomPreviewData:(RoomPreviewData *)roomPreviewData
@@ -133,4 +133,34 @@
}
}
- (void)setTypingNotificationString:(NSString *)typingNotificationString
{
if (typingNotificationString.length > 0)
{
self.typingLabel.text = typingNotificationString;
[self layoutIfNeeded];
[UIView animateWithDuration:.3 animations:^{
self.typingLabel.alpha = 1;
self.displayNameCenterYConstraint.constant = -8;
[self layoutIfNeeded];
}];
}
else
{
[UIView animateWithDuration:.3 animations:^{
self.typingLabel.alpha = 0;
self.displayNameCenterYConstraint.constant = 0;
[self layoutIfNeeded];
} completion:^(BOOL finished) {
self.typingLabel.text = nil;
}];
}
}
- (NSString *)typingNotificationString
{
return self.typingLabel.text;
}
@end