Merge branch 'develop' into element_4085

This commit is contained in:
Gil Eluard 2021-03-19 10:51:40 +01:00
commit 55f95c72a5
18 changed files with 70 additions and 152 deletions

View file

@ -6,9 +6,11 @@ Changes to be released in next version
🙌 Improvements
* Pods: Update FlowCommoniOS, GBDeviceInfo, KeychainAccess, MatomoTracker, SwiftJWT, SwiftLint (#4120).
* Room lists: Remove shields on room avatars (#4115).
🐛 Bugfix
*
* RoomVC: Fix timeline blink on sending.
* RoomVC: Fix not visible last bubble issue.
⚠️ API Changes
*

View file

@ -59,7 +59,6 @@ class CommonConfiguration: NSObject, Configurable {
// Enable e2e encryption for newly created MXSession
sdkOptions.enableCryptoWhenStartingMXSession = true
sdkOptions.computeE2ERoomSummaryTrust = true
// Disable identicon use
sdkOptions.disableIdenticonUseForUserAvatar = true

View file

@ -686,7 +686,7 @@ NSString *const kMXKRoomBubbleCellCallBackButtonPressed = @"kMXKRoomBubbleCellCa
UIImage *image = [UIImage imageNamed:@"sent_message_tick"];
image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
tickView = [[UIImageView alloc] initWithImage:image];
tickView.tintColor = ThemeService.shared.theme.messageTickColor;
tickView.tintColor = ThemeService.shared.theme.textTertiaryColor;
[statusViews addObject:tickView];
[self addTickView:tickView atIndex:((RoomBubbleCellData*)bubbleData).componentIndexOfSentMessageTick];
}
@ -706,7 +706,7 @@ NSString *const kMXKRoomBubbleCellCallBackButtonPressed = @"kMXKRoomBubbleCellCa
{
UIView *progressContentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
CircleProgressView *progressView = [[CircleProgressView alloc] initWithFrame:CGRectMake(24, 24, 16, 16)];
progressView.lineColor = ThemeService.shared.theme.messageTickColor;
progressView.lineColor = ThemeService.shared.theme.textTertiaryColor;
[progressContentView addSubview:progressView];
self.progressChartView = progressView;
@ -722,7 +722,7 @@ NSString *const kMXKRoomBubbleCellCallBackButtonPressed = @"kMXKRoomBubbleCellCa
UIImage *image = [UIImage imageNamed:@"sending_message_tick"];
image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
tickView = [[UIImageView alloc] initWithImage:image];
tickView.tintColor = ThemeService.shared.theme.messageTickColor;
tickView.tintColor = ThemeService.shared.theme.textTertiaryColor;
}
[statusViews addObject:tickView];

View file

@ -39,6 +39,7 @@ import UIKit
var textPrimaryColor: UIColor { get }
var textSecondaryColor: UIColor { get }
var textTertiaryColor: UIColor { get }
var tintColor: UIColor { get }
var tintBackgroundColor: UIColor { get }
@ -63,8 +64,6 @@ import UIKit
var selectedBackgroundColor: UIColor { get }
var messageTickColor: UIColor { get }
// MARK: - Call Screen Specific Colors
var callScreenButtonTintColor: UIColor { get }

View file

@ -40,6 +40,7 @@ class DarkTheme: NSObject, Theme {
var textPrimaryColor: UIColor = UIColor(rgb: 0xFFFFFF)
var textSecondaryColor: UIColor = UIColor(rgb: 0xA9B2BC)
var textTertiaryColor: UIColor = UIColor(rgb: 0x8E99A4)
var tintColor: UIColor = UIColor(displayP3Red: 0.05098039216, green: 0.7450980392, blue: 0.5450980392, alpha: 1.0)
var tintBackgroundColor: UIColor = UIColor(rgb: 0x1F6954)

View file

@ -35,11 +35,12 @@ class DefaultTheme: NSObject, Theme {
var headerBackgroundColor: UIColor = UIColor(rgb: 0xF5F7FA)
var headerBorderColor: UIColor = UIColor(rgb: 0xE9EDF1)
var headerTextPrimaryColor: UIColor = UIColor(rgb: 0x171910)
var headerTextSecondaryColor: UIColor = UIColor(rgb: 0x8F97A3)
var headerTextPrimaryColor: UIColor = UIColor(rgb: 0x17191C)
var headerTextSecondaryColor: UIColor = UIColor(rgb: 0x737D8C)
var textPrimaryColor: UIColor = UIColor(rgb: 0x171910)
var textSecondaryColor: UIColor = UIColor(rgb: 0x8F97A3)
var textPrimaryColor: UIColor = UIColor(rgb: 0x17191C)
var textSecondaryColor: UIColor = UIColor(rgb: 0x737D8C)
var textTertiaryColor: UIColor = UIColor(rgb: 0x8D99A5)
var tintColor: UIColor = UIColor(displayP3Red: 0.05098039216, green: 0.7450980392, blue: 0.5450980392, alpha: 1.0)
var tintBackgroundColor: UIColor = UIColor(rgb: 0xe9fff9)

View file

@ -141,16 +141,6 @@ static const CGFloat kDirectRoomBorderWidth = 3.0;
self.directRoomBorderView.hidden = !roomCellData.roomSummary.room.isDirect;
if (roomCellData.roomSummary.isEncrypted)
{
self.encryptedRoomIcon.hidden = NO;
self.encryptedRoomIcon.image = [self shieldImageForTrustLevel:roomCellData.roomSummary.roomEncryptionTrustLevel];
}
else
{
self.encryptedRoomIcon.hidden = YES;
}
[roomCellData.roomSummary setRoomAvatarImageIn:self.roomAvatar];
}
else
@ -165,32 +155,4 @@ static const CGFloat kDirectRoomBorderWidth = 3.0;
return 74;
}
- (UIImage*)shieldImageForTrustLevel:(RoomEncryptionTrustLevel)roomEncryptionTrustLevel
{
UIImage *shieldImage;
NSString *encryptionIconName;
switch (roomEncryptionTrustLevel)
{
case RoomEncryptionTrustLevelWarning:
encryptionIconName = @"encryption_warning";
break;
case RoomEncryptionTrustLevelNormal:
encryptionIconName = @"encryption_normal";
break;
case RoomEncryptionTrustLevelTrusted:
encryptionIconName = @"encryption_trusted";
break;
case RoomEncryptionTrustLevelUnknown:
encryptionIconName = @"encryption_normal";
break;
}
if (encryptionIconName)
{
shieldImage = [UIImage imageNamed:encryptionIconName];
}
return shieldImage;
}
@end

View file

@ -66,8 +66,6 @@ static const CGFloat kDirectRoomBorderWidth = 3.0;
self.titleLabel.text = room.summary.displayname;
self.directRoomBorderView.hidden = !room.isDirect;
self.encryptedRoomIcon.hidden = !room.summary.isEncrypted;
}
- (void)prepareForReuse
@ -75,7 +73,6 @@ static const CGFloat kDirectRoomBorderWidth = 3.0;
[super prepareForReuse];
self.directRoomBorderView.hidden = YES;
self.encryptedRoomIcon.hidden = YES;
}
+ (CGFloat)cellHeight

View file

@ -147,16 +147,6 @@ static const CGFloat kDirectRoomBorderWidth = 3.0;
self.directRoomBorderView.hidden = !roomCellData.roomSummary.room.isDirect;
if (roomCellData.roomSummary.isEncrypted)
{
self.encryptedRoomIcon.hidden = NO;
self.encryptedRoomIcon.image = [EncryptionTrustLevelBadgeImageHelper roomBadgeImageFor:roomCellData.roomSummary.roomEncryptionTrustLevel];
}
else
{
self.encryptedRoomIcon.hidden = YES;
}
[roomCellData.roomSummary setRoomAvatarImageIn:self.roomAvatar];
}
}

View file

@ -120,6 +120,8 @@
if (self.room.summary.isEncrypted)
{
// Make sure we have the trust shield value
[self.room.summary enableTrustTracking:YES];
[self fetchEncryptionTrustedLevel];
}
}
@ -258,8 +260,12 @@
[self updateStatusInfo];
}
// we may have changed the number of bubbles in this block, consider that change
return bubbles.count;
}
// leave it as is, if coming as 0 from super
return count;
}

View file

@ -1184,7 +1184,10 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo
}];
}
if (customizedRoomDataSource.selectedEventId)
{
[self cancelEventSelection];
}
}
- (void)setRoomTitleViewClass:(Class)roomTitleViewClass

View file

@ -30,7 +30,7 @@ final class RoomBubbleCellLayout: NSObject {
static let readReceiptsViewTopMargin: CGFloat = 5.0
static let readReceiptsViewRightMargin: CGFloat = 6.0
static let readReceiptsViewHeight: CGFloat = 12.0
static let readReceiptsViewHeight: CGFloat = 16.0
static let readReceiptsViewWidth: CGFloat = 150.0
// Read marker

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,7 +13,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="61"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WmY-Jw-mqv" id="ef1-Tq-U3Z">
<rect key="frame" x="0.0" y="0.0" width="600" height="60.5"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="61"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="hgp-Z5-rAj" userLabel="Picture View" customClass="MXKImageView">
@ -39,7 +37,7 @@
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="text message" translatesAutoresizingMaskIntoConstraints="NO" id="HTH-5n-MSU" customClass="MXKMessageTextView">
<rect key="frame" x="51" y="21" width="102" height="39.5"/>
<rect key="frame" x="51" y="21" width="102" height="40"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="MessageTextView"/>
<constraints>
@ -51,7 +49,7 @@
<dataDetectorType key="dataDetectorTypes" link="YES"/>
</textView>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IOg-Kt-8vW">
<rect key="frame" x="515" y="10" width="70" height="50.5"/>
<rect key="frame" x="515" y="10" width="70" height="51"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="BubbleInfoContainer"/>
<constraints>
@ -59,7 +57,7 @@
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="stw-MD-khQ">
<rect key="frame" x="12" y="3" width="576" height="55"/>
<rect key="frame" x="8" y="3" width="584" height="55"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oJa-2k-bLm">
@ -76,7 +74,7 @@
<constraint firstAttribute="trailing" secondItem="q9c-0p-QyP" secondAttribute="trailing" constant="85" id="Bkh-h2-JOQ"/>
<constraint firstItem="q9c-0p-QyP" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" constant="10" id="Ixr-7h-f8j"/>
<constraint firstItem="stw-MD-khQ" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="topMargin" constant="-8" id="JXb-n4-O4S"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="15" id="Shz-6S-kGd"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="25" id="Shz-6S-kGd"/>
<constraint firstItem="q9c-0p-QyP" firstAttribute="leading" secondItem="hgp-Z5-rAj" secondAttribute="trailing" constant="13" id="YWK-C2-15w"/>
<constraint firstItem="oJa-2k-bLm" firstAttribute="top" secondItem="q9c-0p-QyP" secondAttribute="top" constant="-6" id="YqE-ag-Clf"/>
<constraint firstItem="oJa-2k-bLm" firstAttribute="leading" secondItem="q9c-0p-QyP" secondAttribute="leading" constant="-10" id="aAt-io-r0S"/>
@ -108,6 +106,7 @@
<outlet property="userNameLabel" destination="q9c-0p-QyP" id="JId-R7-LoM"/>
<outlet property="userNameTapGestureMaskView" destination="oJa-2k-bLm" id="fyo-Ky-KeF"/>
</connections>
<point key="canvasLocation" x="-128" y="113"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,7 +13,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WmY-Jw-mqv" id="ef1-Tq-U3Z">
<rect key="frame" x="0.0" y="0.0" width="600" height="104.5"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vWC-jH-xa5" userLabel="Pagination Title View">
@ -69,7 +67,7 @@
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="text message" translatesAutoresizingMaskIntoConstraints="NO" id="HTH-5n-MSU" customClass="MXKMessageTextView">
<rect key="frame" x="51" y="65" width="102" height="39.5"/>
<rect key="frame" x="51" y="65" width="102" height="40"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="MessageTextView"/>
<constraints>
@ -81,7 +79,7 @@
<dataDetectorType key="dataDetectorTypes" link="YES"/>
</textView>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IOg-Kt-8vW">
<rect key="frame" x="515" y="54" width="70" height="50.5"/>
<rect key="frame" x="515" y="54" width="70" height="51"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="BubbleInfoContainer"/>
<constraints>
@ -89,7 +87,7 @@
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gJu-zj-Vro">
<rect key="frame" x="12" y="3" width="576" height="99"/>
<rect key="frame" x="8" y="3" width="584" height="99"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DS2-xR-wnK">
@ -108,7 +106,7 @@
<constraint firstItem="DS2-xR-wnK" firstAttribute="leading" secondItem="q9c-0p-QyP" secondAttribute="leading" constant="-10" id="I4g-67-FJ9"/>
<constraint firstItem="q9c-0p-QyP" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" constant="54" id="Ixr-7h-f8j"/>
<constraint firstItem="gJu-zj-Vro" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="topMargin" constant="-8" id="LAr-tM-asT"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="15" id="Shz-6S-kGd"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="25" id="Shz-6S-kGd"/>
<constraint firstAttribute="bottom" secondItem="IOg-Kt-8vW" secondAttribute="bottom" id="TPw-iE-nii"/>
<constraint firstItem="IOg-Kt-8vW" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" constant="54" id="XSL-TG-m62"/>
<constraint firstItem="q9c-0p-QyP" firstAttribute="leading" secondItem="hgp-Z5-rAj" secondAttribute="trailing" constant="13" id="YWK-C2-15w"/>
@ -144,6 +142,7 @@
<outlet property="userNameLabel" destination="q9c-0p-QyP" id="JId-R7-LoM"/>
<outlet property="userNameTapGestureMaskView" destination="DS2-xR-wnK" id="1BS-to-kX8"/>
</connections>
<point key="canvasLocation" x="-128" y="113"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,7 +13,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WmY-Jw-mqv" id="ef1-Tq-U3Z">
<rect key="frame" x="0.0" y="0.0" width="600" height="104.5"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vWC-jH-xa5" userLabel="Pagination Title View">
@ -58,7 +56,7 @@
</constraints>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="text message" translatesAutoresizingMaskIntoConstraints="NO" id="HTH-5n-MSU" customClass="MXKMessageTextView">
<rect key="frame" x="51" y="47" width="102" height="57.5"/>
<rect key="frame" x="51" y="47" width="102" height="58"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="MessageTextView"/>
<constraints>
@ -70,7 +68,7 @@
<dataDetectorType key="dataDetectorTypes" link="YES"/>
</textView>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IOg-Kt-8vW">
<rect key="frame" x="515" y="47" width="70" height="57.5"/>
<rect key="frame" x="515" y="47" width="70" height="58"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="BubbleInfoContainer"/>
<constraints>
@ -78,7 +76,7 @@
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gJu-zj-Vro">
<rect key="frame" x="12" y="3" width="576" height="99"/>
<rect key="frame" x="8" y="3" width="584" height="99"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
@ -90,7 +88,7 @@
<constraint firstAttribute="trailingMargin" secondItem="gJu-zj-Vro" secondAttribute="trailing" constant="-8" id="Dja-ge-KXl"/>
<constraint firstAttribute="bottomMargin" secondItem="gJu-zj-Vro" secondAttribute="bottom" constant="-8" id="H7m-2I-p8c"/>
<constraint firstItem="gJu-zj-Vro" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="topMargin" constant="-8" id="LAr-tM-asT"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="15" id="Shz-6S-kGd"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="25" id="Shz-6S-kGd"/>
<constraint firstAttribute="bottom" secondItem="IOg-Kt-8vW" secondAttribute="bottom" id="TPw-iE-nii"/>
<constraint firstItem="IOg-Kt-8vW" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" constant="47" id="XSL-TG-m62"/>
<constraint firstAttribute="trailing" secondItem="vWC-jH-xa5" secondAttribute="trailing" constant="10" id="bFO-Fe-amS"/>
@ -120,6 +118,7 @@
<outlet property="paginationTitleView" destination="vWC-jH-xa5" id="T7w-0e-WWX"/>
<outlet property="pictureView" destination="hgp-Z5-rAj" id="rKM-QG-RJN"/>
</connections>
<point key="canvasLocation" x="-128" y="113"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,11 +13,11 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WmY-Jw-mqv" id="ef1-Tq-U3Z">
<rect key="frame" x="0.0" y="0.0" width="600" height="39.5"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="40"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="text message" translatesAutoresizingMaskIntoConstraints="NO" id="HTH-5n-MSU" customClass="MXKMessageTextView">
<rect key="frame" x="51" y="0.0" width="102" height="39.5"/>
<rect key="frame" x="51" y="0.0" width="102" height="40"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="MessageTextView"/>
<constraints>
@ -31,7 +29,7 @@
<dataDetectorType key="dataDetectorTypes" link="YES"/>
</textView>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IOg-Kt-8vW">
<rect key="frame" x="515" y="0.0" width="70" height="39.5"/>
<rect key="frame" x="515" y="0.0" width="70" height="40"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="BubbleInfoContainer"/>
<constraints>
@ -39,7 +37,7 @@
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fX2-m6-9ca">
<rect key="frame" x="12" y="3" width="576" height="34"/>
<rect key="frame" x="8" y="3" width="584" height="34"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
@ -48,7 +46,7 @@
<constraint firstAttribute="trailingMargin" secondItem="fX2-m6-9ca" secondAttribute="trailing" constant="-8" id="1CQ-Jh-75x"/>
<constraint firstAttribute="bottomMargin" secondItem="fX2-m6-9ca" secondAttribute="bottom" constant="-8" id="KgE-lV-F7Z"/>
<constraint firstItem="fX2-m6-9ca" firstAttribute="leading" secondItem="ef1-Tq-U3Z" secondAttribute="leadingMargin" constant="-8" id="Mcb-by-8AG"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="15" id="Shz-6S-kGd"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="25" id="Shz-6S-kGd"/>
<constraint firstAttribute="bottom" secondItem="IOg-Kt-8vW" secondAttribute="bottom" id="TPw-iE-nii"/>
<constraint firstItem="IOg-Kt-8vW" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" id="XSL-TG-m62"/>
<constraint firstAttribute="trailing" secondItem="IOg-Kt-8vW" secondAttribute="trailing" constant="15" id="hQV-lO-7aQ"/>
@ -72,6 +70,7 @@
<outlet property="msgTextViewTrailingConstraint" destination="Shz-6S-kGd" id="5ib-m6-Lna"/>
<outlet property="msgTextViewWidthConstraint" destination="aQ3-Pg-LVD" id="JPV-up-dzy"/>
</connections>
<point key="canvasLocation" x="-131" y="113"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,7 +13,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="61"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WmY-Jw-mqv" id="ef1-Tq-U3Z">
<rect key="frame" x="0.0" y="0.0" width="600" height="60.5"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="61"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleAspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="hgp-Z5-rAj" userLabel="Picture View" customClass="MXKImageView">
@ -28,7 +26,7 @@
</constraints>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="text message" translatesAutoresizingMaskIntoConstraints="NO" id="HTH-5n-MSU" customClass="MXKMessageTextView">
<rect key="frame" x="51" y="3" width="102" height="57.5"/>
<rect key="frame" x="51" y="3" width="102" height="58"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="MessageTextView"/>
<constraints>
@ -40,7 +38,7 @@
<dataDetectorType key="dataDetectorTypes" link="YES"/>
</textView>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IOg-Kt-8vW">
<rect key="frame" x="515" y="3" width="70" height="57.5"/>
<rect key="frame" x="515" y="3" width="70" height="58"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="BubbleInfoContainer"/>
<constraints>
@ -48,7 +46,7 @@
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="stw-MD-khQ">
<rect key="frame" x="12" y="3" width="576" height="55"/>
<rect key="frame" x="8" y="3" width="584" height="55"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
@ -59,7 +57,7 @@
<constraint firstItem="IOg-Kt-8vW" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" constant="3" id="4Ac-p5-610"/>
<constraint firstAttribute="bottomMargin" secondItem="stw-MD-khQ" secondAttribute="bottom" constant="-8" id="8Lj-ay-d6E"/>
<constraint firstItem="stw-MD-khQ" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="topMargin" constant="-8" id="JXb-n4-O4S"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="15" id="Shz-6S-kGd"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="HTH-5n-MSU" secondAttribute="trailing" constant="25" id="Shz-6S-kGd"/>
<constraint firstAttribute="bottom" secondItem="IOg-Kt-8vW" secondAttribute="bottom" id="f24-Fr-D4j"/>
<constraint firstItem="HTH-5n-MSU" firstAttribute="top" secondItem="ef1-Tq-U3Z" secondAttribute="top" constant="3" id="mkw-3s-H8B"/>
<constraint firstAttribute="bottom" secondItem="HTH-5n-MSU" secondAttribute="bottom" id="oTk-3F-SEC"/>
@ -84,6 +82,7 @@
<outlet property="msgTextViewWidthConstraint" destination="OX6-NK-oti" id="Ptq-cZ-07y"/>
<outlet property="pictureView" destination="hgp-Z5-rAj" id="rKM-QG-RJN"/>
</connections>
<point key="canvasLocation" x="-128" y="113"/>
</tableViewCell>
</objects>
</document>

View file

@ -70,17 +70,8 @@
}
self.directRoomBorderView.hidden = !roomCellData.roomSummary.isDirect;
if (roomCellData.roomSummary.isEncrypted)
{
self.encryptedRoomIcon.hidden = NO;
self.encryptedRoomIcon.image = [self shieldImageForTrustLevel:roomCellData.roomSummary.roomEncryptionTrustLevel];
}
else
{
self.encryptedRoomIcon.hidden = YES;
}
}
}
+ (CGFloat)cellHeight
@ -88,32 +79,4 @@
return 74;
}
- (UIImage*)shieldImageForTrustLevel:(RoomEncryptionTrustLevel)roomEncryptionTrustLevel
{
UIImage *shieldImage;
NSString *encryptionIconName;
switch (roomEncryptionTrustLevel)
{
case RoomEncryptionTrustLevelWarning:
encryptionIconName = @"encryption_warning";
break;
case RoomEncryptionTrustLevelNormal:
encryptionIconName = @"encryption_normal";
break;
case RoomEncryptionTrustLevelTrusted:
encryptionIconName = @"encryption_trusted";
break;
case RoomEncryptionTrustLevelUnknown:
encryptionIconName = @"encryption_normal";
break;
}
if (encryptionIconName)
{
shieldImage = [UIImage imageNamed:encryptionIconName];
}
return shieldImage;
}
@end