mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
Iphone 6+ / Landscape orientation : The chat tableview was properly refreshed while enlarging/reducing it.
This commit is contained in:
parent
66ad9dc3b3
commit
cd2bd55652
3 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "CustomImageView.h"
|
||||
#import "RoomMessage.h"
|
||||
|
||||
// Room Message Table View Cell
|
||||
@interface RoomMessageTableCell : UITableViewCell
|
||||
|
@ -28,6 +29,9 @@
|
|||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachViewWidthConstraint;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachViewTopConstraint;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dateTimeLabelContainerTopConstraint;
|
||||
|
||||
// reference to the linked message
|
||||
@property (strong, nonatomic) RoomMessage *message;
|
||||
@end
|
||||
|
||||
@interface IncomingMessageTableCell : RoomMessageTableCell
|
||||
|
|
|
@ -26,4 +26,12 @@
|
|||
|
||||
|
||||
@implementation OutgoingMessageTableCell
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
// ensure that the text is still aligned to the left side of the screen
|
||||
// even during animation while enlarging/reducing the viewcontroller (with UISplitViewController)
|
||||
CGFloat leftInset = self.message.maxTextViewWidth - self.message.contentSize.width;
|
||||
self.messageTextView.contentInset = UIEdgeInsetsMake(0, leftInset, 0, -leftInset);
|
||||
}
|
||||
@end
|
|
@ -1202,6 +1202,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
|||
}
|
||||
|
||||
// Restore initial settings
|
||||
cell.message = message;
|
||||
cell.attachmentView.imageURL = nil; // Cancel potential attachment loading
|
||||
cell.attachmentView.hidden = YES;
|
||||
cell.playIconView.hidden = YES;
|
||||
|
|
Loading…
Reference in a new issue