mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Room details: align correctly unsent label with unsent messages
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="GsA-m1-kGB">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="GsA-m1-kGB">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1536" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@@ -169,6 +169,7 @@
|
||||
<outlet property="msgTextViewWidthConstraint" destination="a6g-WS-jjN" id="aM9-xQ-hVM"/>
|
||||
<outlet property="pictureView" destination="mks-jh-AiZ" id="qL1-Kd-oRC"/>
|
||||
<outlet property="unsentLabel" destination="alD-cg-uMl" id="UXm-mh-sux"/>
|
||||
<outlet property="unsentLabelTopConstraint" destination="M1S-HJ-o3b" id="Geo-hs-Ils"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
|
||||
@@ -35,5 +35,6 @@
|
||||
@interface OutgoingMessageTableCell : RoomMessageTableCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *unsentLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *unsentLabelTopConstraint;
|
||||
@end
|
||||
|
||||
|
||||
@@ -684,16 +684,17 @@ NSString *const kFailedEventId = @"failedEventId";
|
||||
// Reset text color
|
||||
cell.messageTextView.textColor = [UIColor blackColor];
|
||||
} else {
|
||||
OutgoingMessageTableCell* outgoingMsgCell = (OutgoingMessageTableCell*)cell;
|
||||
// Hide unsent label by default
|
||||
UILabel *unsentLabel = ((OutgoingMessageTableCell*)cell).unsentLabel;
|
||||
unsentLabel.hidden = YES;
|
||||
outgoingMsgCell.unsentLabel.hidden = YES;
|
||||
|
||||
// Set the right text color for outgoing messages
|
||||
if ([mxEvent.eventId hasPrefix:kLocalEchoEventIdPrefix]) {
|
||||
cell.messageTextView.textColor = [UIColor lightGrayColor];
|
||||
} else if ([mxEvent.eventId hasPrefix:kFailedEventId]) {
|
||||
cell.messageTextView.textColor = [UIColor redColor];
|
||||
unsentLabel.hidden = NO;
|
||||
outgoingMsgCell.unsentLabel.hidden = NO;
|
||||
outgoingMsgCell.unsentLabelTopConstraint.constant = cell.msgTextViewTopConstraint.constant + cell.messageTextView.contentInset.top - ROOM_MESSAGE_CELL_TEXTVIEW_TOP_CONST_GROUPED_CELL;
|
||||
} else {
|
||||
cell.messageTextView.textColor = [UIColor blackColor];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user