mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 00:02:47 +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 <UIKit/UIKit.h>
|
||||||
#import "CustomImageView.h"
|
#import "CustomImageView.h"
|
||||||
|
#import "RoomMessage.h"
|
||||||
|
|
||||||
// Room Message Table View Cell
|
// Room Message Table View Cell
|
||||||
@interface RoomMessageTableCell : UITableViewCell
|
@interface RoomMessageTableCell : UITableViewCell
|
||||||
|
@ -28,6 +29,9 @@
|
||||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachViewWidthConstraint;
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachViewWidthConstraint;
|
||||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachViewTopConstraint;
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachViewTopConstraint;
|
||||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dateTimeLabelContainerTopConstraint;
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dateTimeLabelContainerTopConstraint;
|
||||||
|
|
||||||
|
// reference to the linked message
|
||||||
|
@property (strong, nonatomic) RoomMessage *message;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface IncomingMessageTableCell : RoomMessageTableCell
|
@interface IncomingMessageTableCell : RoomMessageTableCell
|
||||||
|
|
|
@ -26,4 +26,12 @@
|
||||||
|
|
||||||
|
|
||||||
@implementation OutgoingMessageTableCell
|
@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
|
@end
|
|
@ -1202,6 +1202,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore initial settings
|
// Restore initial settings
|
||||||
|
cell.message = message;
|
||||||
cell.attachmentView.imageURL = nil; // Cancel potential attachment loading
|
cell.attachmentView.imageURL = nil; // Cancel potential attachment loading
|
||||||
cell.attachmentView.hidden = YES;
|
cell.attachmentView.hidden = YES;
|
||||||
cell.playIconView.hidden = YES;
|
cell.playIconView.hidden = YES;
|
||||||
|
|
Loading…
Reference in a new issue