Skip to content

Commit

Permalink
Merge branch 'develop' into ismail/4642_additions
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailgulek authored Aug 6, 2021
2 parents 9ea26a5 + 8f64404 commit d0fd365
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 115 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changes to be released in next version
* Voice messages: Allow voice message playback control from the iOS lock screen and control center (#4655)
* Voice messages: Improve audio recording quality
* Voice messages: Remove labs setting and enable them by default
* Room: Remove the green border from direct message room avatars (#4520).
* VoIP: Additional changes on call tiles (#4642).

🐛 Bugfix
Expand Down
1 change: 0 additions & 1 deletion Riot/Modules/Common/Recents/Views/RecentTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

@property (weak, nonatomic) IBOutlet UIView *missedNotifAndUnreadIndicator;
@property (weak, nonatomic) IBOutlet MXKImageView *roomAvatar;
@property (weak, nonatomic) IBOutlet UIView *directRoomBorderView;
@property (weak, nonatomic) IBOutlet UIImageView *encryptedRoomIcon;

@property (weak, nonatomic) IBOutlet UILabel *missedNotifAndUnreadBadgeLabel;
Expand Down
17 changes: 0 additions & 17 deletions Riot/Modules/Common/Recents/Views/RecentTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@

#import "MXRoomSummary+Riot.h"

#pragma mark - Defines & Constants

static const CGFloat kDirectRoomBorderColorAlpha = 0.75;
static const CGFloat kDirectRoomBorderWidth = 3.0;

@implementation RecentTableViewCell

#pragma mark - Class methods
Expand All @@ -54,16 +49,6 @@ - (void)customizeTableViewCellRendering
self.lastEventDate.textColor = ThemeService.shared.theme.textSecondaryColor;
self.missedNotifAndUnreadBadgeLabel.textColor = ThemeService.shared.theme.baseTextPrimaryColor;

// Prepare direct room border
CGColorRef directRoomBorderColor = CGColorCreateCopyWithAlpha(ThemeService.shared.theme.tintColor.CGColor, kDirectRoomBorderColorAlpha);

[self.directRoomBorderView.layer setCornerRadius:self.directRoomBorderView.frame.size.width / 2];
self.directRoomBorderView.clipsToBounds = YES;
self.directRoomBorderView.layer.borderColor = directRoomBorderColor;
self.directRoomBorderView.layer.borderWidth = kDirectRoomBorderWidth;

CFRelease(directRoomBorderColor);

self.roomAvatar.defaultBackgroundColor = [UIColor clearColor];
}

Expand Down Expand Up @@ -138,8 +123,6 @@ - (void)render:(MXKCellData *)cellData
// The room title is not bold anymore
self.roomTitle.font = [UIFont systemFontOfSize:17 weight:UIFontWeightMedium];
}

self.directRoomBorderView.hidden = !roomCellData.roomSummary.room.isDirect;

[roomCellData.roomSummary setRoomAvatarImageIn:self.roomAvatar];
}
Expand Down
15 changes: 2 additions & 13 deletions Riot/Modules/Common/Recents/Views/RecentTableViewCell.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" 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="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -34,14 +34,6 @@
<constraint firstAttribute="height" constant="42" id="WPC-tL-hnM"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8CY-Ku-0qh">
<rect key="frame" x="13" y="15" width="42" height="42"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="ize-F0-OeQ"/>
<constraint firstAttribute="width" constant="42" id="t6V-Zm-EM3"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="RoomTitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lg1-xQ-AGn">
<rect key="frame" x="69" y="14" width="451" height="21"/>
<accessibility key="accessibilityConfiguration" identifier="TitleLabel"/>
Expand Down Expand Up @@ -109,7 +101,6 @@
</subviews>
<constraints>
<constraint firstItem="F6K-PV-15f" firstAttribute="trailing" secondItem="360-Go-RcG" secondAttribute="trailing" id="3qB-Na-Eqs"/>
<constraint firstItem="8CY-Ku-0qh" firstAttribute="centerX" secondItem="RX5-eD-c3c" secondAttribute="centerX" id="FVh-1h-VkB"/>
<constraint firstItem="360-Go-RcG" firstAttribute="leading" secondItem="OeZ-wN-eil" secondAttribute="trailing" constant="8" id="KuE-8m-e9A"/>
<constraint firstItem="e7r-zL-9bw" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leading" id="PUW-if-ewh"/>
<constraint firstItem="Lg1-xQ-AGn" firstAttribute="leading" secondItem="RX5-eD-c3c" secondAttribute="trailing" constant="14" id="Pgp-JM-oQd"/>
Expand All @@ -127,13 +118,11 @@
<constraint firstAttribute="trailing" secondItem="dQt-mN-T6b" secondAttribute="trailing" constant="30" id="t2m-pb-5zd"/>
<constraint firstItem="Lg1-xQ-AGn" firstAttribute="top" secondItem="aXz-IR-jj5" secondAttribute="top" constant="14" id="tY3-6V-A3B"/>
<constraint firstItem="RX5-eD-c3c" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leading" constant="13" id="tgy-cX-Wxm"/>
<constraint firstItem="8CY-Ku-0qh" firstAttribute="centerY" secondItem="RX5-eD-c3c" secondAttribute="centerY" id="ukJ-yz-Kit"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="RecentTableViewCell"/>
<connections>
<outlet property="directRoomBorderView" destination="8CY-Ku-0qh" id="vKk-ZO-TQq"/>
<outlet property="encryptedRoomIcon" destination="NAZ-zd-MHS" id="ZsH-Zr-Q4K"/>
<outlet property="lastEventDate" destination="360-Go-RcG" id="Y0L-Dj-ZVn"/>
<outlet property="lastEventDecriptionLabelTrailingConstraint" destination="t2m-pb-5zd" id="cxp-7Z-bEg"/>
Expand Down
1 change: 0 additions & 1 deletion Riot/Modules/Contacts/Details/Views/RoomTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@interface RoomTableViewCell : MXKTableViewCell

@property (weak, nonatomic) IBOutlet MXKImageView *avatarImageView;
@property (weak, nonatomic) IBOutlet UIView *directRoomBorderView;
@property (weak, nonatomic) IBOutlet UIImageView *encryptedRoomIcon;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

Expand Down
24 changes: 0 additions & 24 deletions Riot/Modules/Contacts/Details/Views/RoomTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@

#import "MXRoomSummary+Riot.h"

#pragma mark - Defines & Constants

static const CGFloat kDirectRoomBorderColorAlpha = 0.75;
static const CGFloat kDirectRoomBorderWidth = 3.0;

@implementation RoomTableViewCell

#pragma mark - Class methods
Expand All @@ -37,16 +32,6 @@ - (void)customizeTableViewCellRendering

self.titleLabel.textColor = ThemeService.shared.theme.textPrimaryColor;

// Prepare direct room border
CGColorRef directRoomBorderColor = CGColorCreateCopyWithAlpha(ThemeService.shared.theme.tintColor.CGColor, kDirectRoomBorderColorAlpha);

[self.directRoomBorderView.layer setCornerRadius:self.directRoomBorderView.frame.size.width / 2];
self.directRoomBorderView.clipsToBounds = YES;
self.directRoomBorderView.layer.borderColor = directRoomBorderColor;
self.directRoomBorderView.layer.borderWidth = kDirectRoomBorderWidth;

CFRelease(directRoomBorderColor);

self.avatarImageView.defaultBackgroundColor = [UIColor clearColor];
}

Expand All @@ -64,15 +49,6 @@ - (void)render:(MXRoom *)room
[room.summary setRoomAvatarImageIn:self.avatarImageView];

self.titleLabel.text = room.summary.displayname;

self.directRoomBorderView.hidden = !room.isDirect;
}

- (void)prepareForReuse
{
[super prepareForReuse];

self.directRoomBorderView.hidden = YES;
}

+ (CGFloat)cellHeight
Expand Down
34 changes: 11 additions & 23 deletions Riot/Modules/Contacts/Details/Views/RoomTableViewCell.xib
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" 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="18122" 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="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -14,28 +12,21 @@
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="L2L-l5-wPx" customClass="RoomTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="600" height="74"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="L2L-l5-wPx" id="aXz-IR-jj5">
<rect key="frame" x="0.0" y="0.0" width="600" height="73.5"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="L2L-l5-wPx" id="aXz-IR-jj5">
<rect key="frame" x="0.0" y="0.0" width="600" height="74"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FfX-ul-Kr4" customClass="MXKImageView">
<rect key="frame" x="26" y="16" width="42" height="42"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="AvatarImageView"/>
<constraints>
<constraint firstAttribute="width" constant="42" id="DCk-EO-Wpn"/>
<constraint firstAttribute="height" constant="42" id="bkm-0A-IeX"/>
<constraint firstAttribute="width" secondItem="FfX-ul-Kr4" secondAttribute="height" multiplier="1:1" id="ycc-8M-xEj"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O8i-B6-S6A">
<rect key="frame" x="26" y="16" width="42" height="42"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="O8i-B6-S6A" secondAttribute="height" multiplier="1:1" id="KP4-Uc-4pf"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lg1-xQ-AGn">
<rect key="frame" x="82" y="27" width="34" height="20"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" ambiguous="YES" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lg1-xQ-AGn">
<rect key="frame" x="82" y="27" width="33" height="20"/>
<accessibility key="accessibilityConfiguration" identifier="TitleLabel"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="NW9-MB-gf4"/>
Expand All @@ -45,7 +36,7 @@
<nil key="highlightedColor"/>
</label>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="e2e_verified" translatesAutoresizingMaskIntoConstraints="NO" id="apY-Nk-wQh">
<rect key="frame" x="62" y="45" width="11" height="13"/>
<rect key="frame" x="58" y="45" width="11" height="13"/>
<accessibility key="accessibilityConfiguration" identifier="EncryptedRoomIcon"/>
<constraints>
<constraint firstAttribute="width" constant="11" id="6Pz-2E-7D8"/>
Expand All @@ -56,25 +47,22 @@
<constraints>
<constraint firstItem="Lg1-xQ-AGn" firstAttribute="leading" secondItem="FfX-ul-Kr4" secondAttribute="trailing" constant="14" id="A6H-TC-2Pg"/>
<constraint firstAttribute="bottom" secondItem="FfX-ul-Kr4" secondAttribute="bottom" constant="15.5" id="D2o-qq-OsZ"/>
<constraint firstItem="O8i-B6-S6A" firstAttribute="centerY" secondItem="FfX-ul-Kr4" secondAttribute="centerY" id="L8U-Xi-rD7"/>
<constraint firstItem="Lg1-xQ-AGn" firstAttribute="centerY" secondItem="aXz-IR-jj5" secondAttribute="centerY" id="O6E-Di-2d4"/>
<constraint firstItem="apY-Nk-wQh" firstAttribute="top" secondItem="aXz-IR-jj5" secondAttribute="topMargin" constant="34" id="Rlm-bQ-Qpr"/>
<constraint firstItem="O8i-B6-S6A" firstAttribute="width" secondItem="FfX-ul-Kr4" secondAttribute="width" id="Sej-VT-sBx"/>
<constraint firstAttribute="trailingMargin" relation="greaterThanOrEqual" secondItem="Lg1-xQ-AGn" secondAttribute="trailing" constant="15" id="U1F-vo-7f6"/>
<constraint firstItem="apY-Nk-wQh" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leadingMargin" constant="42" id="dut-Df-DIU"/>
<constraint firstItem="FfX-ul-Kr4" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leadingMargin" constant="6" id="qey-6T-URF"/>
<constraint firstItem="FfX-ul-Kr4" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leadingMargin" constant="10" id="qey-6T-URF"/>
<constraint firstItem="FfX-ul-Kr4" firstAttribute="top" secondItem="aXz-IR-jj5" secondAttribute="top" constant="16" id="wyT-JI-kQS"/>
<constraint firstItem="O8i-B6-S6A" firstAttribute="centerX" secondItem="FfX-ul-Kr4" secondAttribute="centerX" id="xfK-sI-YJQ"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="RoomTableViewCell"/>
<connections>
<outlet property="avatarImageView" destination="FfX-ul-Kr4" id="NOo-Lj-BBY"/>
<outlet property="directRoomBorderView" destination="O8i-B6-S6A" id="b7x-Sz-SiX"/>
<outlet property="encryptedRoomIcon" destination="apY-Nk-wQh" id="qlf-6j-voX"/>
<outlet property="titleLabel" destination="Lg1-xQ-AGn" id="uqU-hH-KT0"/>
</connections>
<point key="canvasLocation" x="-14" y="132"/>
</tableViewCell>
</objects>
<resources>
Expand Down
1 change: 0 additions & 1 deletion Riot/Modules/Home/Views/RoomCollectionViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

@property (weak, nonatomic) IBOutlet UIView *editionArrowView;

@property (weak, nonatomic) IBOutlet UIView *directRoomBorderView;
@property (weak, nonatomic) IBOutlet MXKImageView *roomAvatar;
@property (weak, nonatomic) IBOutlet UIImageView *encryptedRoomIcon;

Expand Down
17 changes: 0 additions & 17 deletions Riot/Modules/Home/Views/RoomCollectionViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@

#import "MXTools.h"

#pragma mark - Defines & Constants

static const CGFloat kDirectRoomBorderColorAlpha = 0.75;
static const CGFloat kDirectRoomBorderWidth = 3.0;

@implementation RoomCollectionViewCell

#pragma mark - Class methods
Expand Down Expand Up @@ -67,16 +62,6 @@ - (void)customizeCollectionViewCellRendering
self.roomTitle1.textColor = ThemeService.shared.theme.textPrimaryColor;
self.roomTitle2.textColor = ThemeService.shared.theme.textPrimaryColor;

// Prepare direct room border
CGColorRef directRoomBorderColor = CGColorCreateCopyWithAlpha(ThemeService.shared.theme.tintColor.CGColor, kDirectRoomBorderColorAlpha);

[self.directRoomBorderView.layer setCornerRadius:self.directRoomBorderView.frame.size.width / 2];
self.directRoomBorderView.clipsToBounds = YES;
self.directRoomBorderView.layer.borderColor = directRoomBorderColor;
self.directRoomBorderView.layer.borderWidth = kDirectRoomBorderWidth;

CFRelease(directRoomBorderColor);

self.editionArrowView.backgroundColor = ThemeService.shared.theme.headerBackgroundColor;

self.roomAvatar.defaultBackgroundColor = [UIColor clearColor];
Expand Down Expand Up @@ -145,8 +130,6 @@ - (void)render:(MXKCellData *)cellData

}

self.directRoomBorderView.hidden = !roomCellData.roomSummary.room.isDirect;

[roomCellData.roomSummary setRoomAvatarImageIn:self.roomAvatar];
}
}
Expand Down
Loading

0 comments on commit d0fd365

Please sign in to comment.