mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Merge branch 'develop' of https://github.com/vector-im/element-ios into langleyd/4781_swiftui_template_example2
This commit is contained in:
commit
07b0c0ab80
21 changed files with 143 additions and 77 deletions
11
CHANGES.md
11
CHANGES.md
|
@ -1,3 +1,14 @@
|
|||
## Changes in 1.5.4 (2021-09-16)
|
||||
|
||||
🙌 Improvements
|
||||
|
||||
- Upgrade MatrixKit version ([v0.16.1](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.16.1)).
|
||||
|
||||
🐛 Bugfixes
|
||||
|
||||
- RoomBubbleCellData: Fix crash when creating a URL preview when the link didn't end up in the last bubble component. ([#4823](https://github.com/vector-im/element-ios/issues/4823))
|
||||
|
||||
|
||||
## Changes in 1.5.3 (2021-09-09)
|
||||
|
||||
✨ Features
|
||||
|
|
|
@ -15,5 +15,5 @@
|
|||
//
|
||||
|
||||
// Version
|
||||
MARKETING_VERSION = 1.5.4
|
||||
CURRENT_PROJECT_VERSION = 1.5.4
|
||||
MARKETING_VERSION = 1.5.5
|
||||
CURRENT_PROJECT_VERSION = 1.5.5
|
||||
|
|
2
Podfile
2
Podfile
|
@ -13,7 +13,7 @@ use_frameworks!
|
|||
# - `{ {kit spec hash} => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for each repo. Used by Fastfile during CI
|
||||
#
|
||||
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
|
||||
$matrixKitVersion = '= 0.16.0'
|
||||
$matrixKitVersion = '= 0.16.1'
|
||||
# $matrixKitVersion = :local
|
||||
# $matrixKitVersion = {'develop' => 'develop'}
|
||||
|
||||
|
|
40
Podfile.lock
40
Podfile.lock
|
@ -58,36 +58,36 @@ PODS:
|
|||
- MatomoTracker (7.4.1):
|
||||
- MatomoTracker/Core (= 7.4.1)
|
||||
- MatomoTracker/Core (7.4.1)
|
||||
- MatrixKit (0.16.0):
|
||||
- MatrixKit (0.16.1):
|
||||
- Down (~> 0.11.0)
|
||||
- DTCoreText (~> 1.6.25)
|
||||
- HPGrowingTextView (~> 1.1)
|
||||
- libPhoneNumber-iOS (~> 0.9.13)
|
||||
- MatrixKit/Core (= 0.16.0)
|
||||
- MatrixSDK (= 0.20.0)
|
||||
- MatrixKit/Core (0.16.0):
|
||||
- MatrixKit/Core (= 0.16.1)
|
||||
- MatrixSDK (= 0.20.1)
|
||||
- MatrixKit/Core (0.16.1):
|
||||
- Down (~> 0.11.0)
|
||||
- DTCoreText (~> 1.6.25)
|
||||
- HPGrowingTextView (~> 1.1)
|
||||
- libPhoneNumber-iOS (~> 0.9.13)
|
||||
- MatrixSDK (= 0.20.0)
|
||||
- MatrixSDK (0.20.0):
|
||||
- MatrixSDK/Core (= 0.20.0)
|
||||
- MatrixSDK/Core (0.20.0):
|
||||
- MatrixSDK (= 0.20.1)
|
||||
- MatrixSDK (0.20.1):
|
||||
- MatrixSDK/Core (= 0.20.1)
|
||||
- MatrixSDK/Core (0.20.1):
|
||||
- AFNetworking (~> 4.0.0)
|
||||
- GZIP (~> 1.3.0)
|
||||
- libbase58 (~> 0.1.4)
|
||||
- OLMKit (~> 3.2.4)
|
||||
- Realm (= 10.7.6)
|
||||
- SwiftyBeaver (= 1.9.5)
|
||||
- MatrixSDK/JingleCallStack (0.20.0):
|
||||
- MatrixSDK/JingleCallStack (0.20.1):
|
||||
- JitsiMeetSDK (= 3.5.0)
|
||||
- MatrixSDK/Core
|
||||
- OLMKit (3.2.4):
|
||||
- OLMKit/olmc (= 3.2.4)
|
||||
- OLMKit/olmcpp (= 3.2.4)
|
||||
- OLMKit/olmc (3.2.4)
|
||||
- OLMKit/olmcpp (3.2.4)
|
||||
- OLMKit (3.2.5):
|
||||
- OLMKit/olmc (= 3.2.5)
|
||||
- OLMKit/olmcpp (= 3.2.5)
|
||||
- OLMKit/olmc (3.2.5)
|
||||
- OLMKit/olmcpp (3.2.5)
|
||||
- ReadMoreTextView (3.0.1)
|
||||
- Realm (10.7.6):
|
||||
- Realm/Headers (= 10.7.6)
|
||||
|
@ -124,7 +124,7 @@ DEPENDENCIES:
|
|||
- KeychainAccess (~> 4.2.2)
|
||||
- KTCenterFlowLayout (~> 1.3.1)
|
||||
- MatomoTracker (~> 7.4.1)
|
||||
- MatrixKit (= 0.16.0)
|
||||
- MatrixKit (= 0.16.1)
|
||||
- MatrixSDK
|
||||
- MatrixSDK/JingleCallStack
|
||||
- OLMKit
|
||||
|
@ -204,9 +204,9 @@ SPEC CHECKSUMS:
|
|||
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
|
||||
Logging: beeb016c9c80cf77042d62e83495816847ef108b
|
||||
MatomoTracker: 24a846c9d3aa76933183fe9d47fd62c9efa863fb
|
||||
MatrixKit: ee31a0ef0304c1c4ff4477f977772efed44f2b49
|
||||
MatrixSDK: 07bbc083632799e9ef7f3b14139cb1ab72f1610e
|
||||
OLMKit: 2d73cd67d149b5c3e3a8eb8ecae93d0b429d8a02
|
||||
MatrixKit: 7033539085bc94b6b8755fdab68ba6f7e6e79d56
|
||||
MatrixSDK: 37fbb6a650095387e908937b7411c4370599c90b
|
||||
OLMKit: 9fb4799c4a044dd2c06bda31ec31a12191ad30b5
|
||||
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
|
||||
Realm: ed860452717c8db8f4bf832b6807f7f2ce708839
|
||||
Reusable: 53a9acf5c536f229b31b5865782414b508252ddb
|
||||
|
@ -219,6 +219,6 @@ SPEC CHECKSUMS:
|
|||
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
|
||||
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
|
||||
|
||||
PODFILE CHECKSUM: fb064b7e46b1b13cf36073762d0ebf44d1fe9002
|
||||
PODFILE CHECKSUM: 9478742d5244cae5112451119f9e004eae089967
|
||||
|
||||
COCOAPODS: 1.10.2
|
||||
COCOAPODS: 1.10.1
|
||||
|
|
|
@ -452,6 +452,7 @@ Tap the + to start adding people.";
|
|||
|
||||
"settings_user_settings" = "USER SETTINGS";
|
||||
"settings_sending_media" = "SENDING IMAGES AND VIDEOS";
|
||||
"settings_links" = "LINKS";
|
||||
"settings_notifications" = "NOTIFICATIONS";
|
||||
"settings_calls_settings" = "CALLS";
|
||||
"settings_discovery_settings" = "DISCOVERY";
|
||||
|
@ -542,7 +543,7 @@ Tap the + to start adding people.";
|
|||
"settings_ui_theme_picker_message_invert_colours" = "\"Auto\" uses your device's \"Invert Colours\" settings";
|
||||
"settings_ui_theme_picker_message_match_system_theme" = "\"Auto\" matches your device's system theme";
|
||||
|
||||
"settings_show_url_previews" = "Show inline URL previews";
|
||||
"settings_show_url_previews" = "Show website preview";
|
||||
"settings_show_url_previews_description" = "Previews will only be shown in unencrypted rooms.";
|
||||
|
||||
"settings_unignore_user" = "Show all messages from %@?";
|
||||
|
|
|
@ -4430,6 +4430,10 @@ internal enum VectorL10n {
|
|||
internal static var settingsLabsVoiceMessages: String {
|
||||
return VectorL10n.tr("Vector", "settings_labs_voice_messages")
|
||||
}
|
||||
/// LINKS
|
||||
internal static var settingsLinks: String {
|
||||
return VectorL10n.tr("Vector", "settings_links")
|
||||
}
|
||||
/// Mark all messages as read
|
||||
internal static var settingsMarkAllAsRead: String {
|
||||
return VectorL10n.tr("Vector", "settings_mark_all_as_read")
|
||||
|
@ -4570,7 +4574,7 @@ internal enum VectorL10n {
|
|||
internal static var settingsShowNSFWPublicRooms: String {
|
||||
return VectorL10n.tr("Vector", "settings_show_NSFW_public_rooms")
|
||||
}
|
||||
/// Show inline URL previews
|
||||
/// Show website preview
|
||||
internal static var settingsShowUrlPreviews: String {
|
||||
return VectorL10n.tr("Vector", "settings_show_url_previews")
|
||||
}
|
||||
|
|
|
@ -160,8 +160,7 @@ final class RiotSettings: NSObject {
|
|||
@UserDefault(key: "roomScreenAllowFilesAction", defaultValue: BuildSettings.roomScreenAllowFilesAction, storage: defaults)
|
||||
var roomScreenAllowFilesAction
|
||||
|
||||
// labs prefix added to the key can be dropped when default value becomes true
|
||||
@UserDefault(key: "labsRoomScreenShowsURLPreviews", defaultValue: false, storage: defaults)
|
||||
@UserDefault(key: "roomScreenShowsURLPreviews", defaultValue: true, storage: defaults)
|
||||
var roomScreenShowsURLPreviews
|
||||
|
||||
// MARK: - Room Contextual Menu
|
||||
|
|
|
@ -254,6 +254,14 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
|||
return attributedTextMessage;
|
||||
}
|
||||
|
||||
- (BOOL)hasLink
|
||||
{
|
||||
// Only check the last bubble component as -addEvent:andRoomState: will break up
|
||||
// the data that way, to always show a URL preview at the bottom of the cell.
|
||||
MXKRoomBubbleComponent *lastComponent = bubbleComponents.lastObject;
|
||||
return (lastComponent && lastComponent.link);
|
||||
}
|
||||
|
||||
- (BOOL)hasNoDisplay
|
||||
{
|
||||
if (self.tag == RoomBubbleCellDataTagKeyVerificationNoDisplay)
|
||||
|
@ -1076,7 +1084,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
|
|||
{
|
||||
// Get the last bubble component as that contains the link.
|
||||
MXKRoomBubbleComponent *lastComponent = bubbleComponents.lastObject;
|
||||
if (!lastComponent)
|
||||
if (!lastComponent || !lastComponent.link)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -388,6 +388,8 @@ const CGFloat kTypingCellHeight = 24;
|
|||
[bubbleCell.tmpSubviews addObject:urlPreviewView];
|
||||
|
||||
urlPreviewView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
// TODO: Use cellData.maxTextViewWidth when the view height is part of RoomBubbleCellData's additional height.
|
||||
urlPreviewView.availableWidth = tableView.contentSize.width;
|
||||
[bubbleCell.contentView addSubview:urlPreviewView];
|
||||
|
||||
CGFloat leftMargin = RoomBubbleCellLayout.reactionsViewLeftMargin;
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
if (RiotSettings.shared.roomScreenShowsURLPreviews && bubbleData && bubbleData.showURLPreview)
|
||||
{
|
||||
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData
|
||||
fitting:maxWidth];
|
||||
}
|
||||
|
||||
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
|
|
|
@ -53,7 +53,8 @@
|
|||
if (RiotSettings.shared.roomScreenShowsURLPreviews && bubbleData && bubbleData.showURLPreview)
|
||||
{
|
||||
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData
|
||||
fitting:maxWidth];
|
||||
}
|
||||
|
||||
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
if (RiotSettings.shared.roomScreenShowsURLPreviews && bubbleData && bubbleData.showURLPreview)
|
||||
{
|
||||
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData
|
||||
fitting:maxWidth];
|
||||
}
|
||||
|
||||
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
if (RiotSettings.shared.roomScreenShowsURLPreviews && bubbleData && bubbleData.showURLPreview)
|
||||
{
|
||||
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData
|
||||
fitting:maxWidth];
|
||||
}
|
||||
|
||||
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
if (RiotSettings.shared.roomScreenShowsURLPreviews && bubbleData && bubbleData.showURLPreview)
|
||||
{
|
||||
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
|
||||
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData
|
||||
fitting:maxWidth];
|
||||
}
|
||||
|
||||
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
|
|
|
@ -33,6 +33,13 @@ class URLPreviewView: UIView, NibLoadable, Themable {
|
|||
private enum Constants {
|
||||
/// The fixed width of the preview view.
|
||||
static let width: CGFloat = 267.0
|
||||
/// A reduced width available for use on 4" devices.
|
||||
static let reducedWidth: CGFloat = 230
|
||||
|
||||
/// The availableWidth value that the XIB file is designed against.
|
||||
static let defaultAvailableWidth: CGFloat = 375
|
||||
/// The threshold value for available width that triggers the view to use a reducedWidth
|
||||
static let reducedWidthThreshold: CGFloat = 320
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
@ -48,22 +55,33 @@ class URLPreviewView: UIView, NibLoadable, Themable {
|
|||
}
|
||||
}
|
||||
|
||||
/// The total width available for the view to layout.
|
||||
/// Note: The view's width will be the largest `Constant` that fits this size.
|
||||
var availableWidth: CGFloat = Constants.defaultAvailableWidth {
|
||||
didSet {
|
||||
// TODO: adjust values when using RoomBubbleCellData's maxTextViewWidth property
|
||||
widthConstraint.constant = availableWidth <= Constants.reducedWidthThreshold ? Constants.reducedWidth : Constants.width
|
||||
}
|
||||
}
|
||||
|
||||
weak var delegate: URLPreviewViewDelegate?
|
||||
|
||||
@IBOutlet weak var imageView: UIImageView!
|
||||
@IBOutlet weak var closeButton: UIButton!
|
||||
@IBOutlet private weak var imageView: UIImageView!
|
||||
@IBOutlet private weak var closeButton: UIButton!
|
||||
|
||||
@IBOutlet weak var textContainerView: UIView!
|
||||
@IBOutlet weak var siteNameLabel: UILabel!
|
||||
@IBOutlet weak var titleLabel: UILabel!
|
||||
@IBOutlet weak var descriptionLabel: UILabel!
|
||||
@IBOutlet private weak var textContainerView: UIView!
|
||||
@IBOutlet private weak var siteNameLabel: UILabel!
|
||||
@IBOutlet private weak var titleLabel: UILabel!
|
||||
@IBOutlet private weak var descriptionLabel: UILabel!
|
||||
|
||||
@IBOutlet weak var loadingView: UIView!
|
||||
@IBOutlet weak var loadingActivityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet private weak var loadingView: UIView!
|
||||
@IBOutlet private weak var loadingActivityIndicator: UIActivityIndicatorView!
|
||||
|
||||
// The constraint that determines the view's width
|
||||
@IBOutlet private weak var widthConstraint: NSLayoutConstraint!
|
||||
// Matches the label's height with the close button.
|
||||
// Use a strong reference to keep it around when deactivating.
|
||||
@IBOutlet var siteNameLabelHeightConstraint: NSLayoutConstraint!
|
||||
@IBOutlet private var siteNameLabelHeightConstraint: NSLayoutConstraint!
|
||||
|
||||
/// Returns true when `titleLabel` has a non-empty string.
|
||||
private var hasTitle: Bool {
|
||||
|
@ -114,8 +132,9 @@ class URLPreviewView: UIView, NibLoadable, Themable {
|
|||
closeButton.setImage(closeButtonAsset.image, for: .normal)
|
||||
}
|
||||
|
||||
static func contentViewHeight(for preview: URLPreviewData?) -> CGFloat {
|
||||
sizingView.frame = CGRect(x: 0, y: 0, width: Constants.width, height: 1)
|
||||
static func contentViewHeight(for preview: URLPreviewData?, fitting maxWidth: CGFloat) -> CGFloat {
|
||||
sizingView.availableWidth = maxWidth
|
||||
sizingView.frame = CGRect(x: 0, y: 0, width: sizingView.widthConstraint.constant, height: 1)
|
||||
|
||||
// Call render directly to avoid storing the preview data in the sizing view
|
||||
if let preview = preview {
|
||||
|
@ -127,7 +146,7 @@ class URLPreviewView: UIView, NibLoadable, Themable {
|
|||
sizingView.setNeedsLayout()
|
||||
sizingView.layoutIfNeeded()
|
||||
|
||||
let fittingSize = CGSize(width: Constants.width, height: UIView.layoutFittingCompressedSize.height)
|
||||
let fittingSize = CGSize(width: sizingView.widthConstraint.constant, height: UIView.layoutFittingCompressedSize.height)
|
||||
let layoutSize = sizingView.systemLayoutSizeFitting(fittingSize)
|
||||
|
||||
return layoutSize.height
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="4zc-0W-jb8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="267" height="140"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="140" id="QpS-Ys-x5s"/>
|
||||
<constraint firstAttribute="width" secondItem="4zc-0W-jb8" secondAttribute="height" multiplier="267:140" id="0xq-yj-vni"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="n9x-Yn-0qQ" userLabel="Text Container">
|
||||
|
@ -109,6 +109,7 @@
|
|||
<outlet property="siteNameLabelHeightConstraint" destination="vhD-hz-f58" id="Bz9-ub-9UA"/>
|
||||
<outlet property="textContainerView" destination="n9x-Yn-0qQ" id="Zul-rd-vrp"/>
|
||||
<outlet property="titleLabel" destination="IVX-5S-0kr" id="PRN-5g-HiO"/>
|
||||
<outlet property="widthConstraint" destination="f2o-yq-NFO" id="bn0-wB-66e"/>
|
||||
<outletCollection property="gestureRecognizers" destination="rSB-1V-Kev" appends="YES" id="OOJ-ft-VIj"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="1852.8985507246377" y="14.397321428571427"/>
|
||||
|
|
|
@ -52,6 +52,7 @@ enum
|
|||
SECTION_TAG_SIGN_OUT = 0,
|
||||
SECTION_TAG_USER_SETTINGS,
|
||||
SECTION_TAG_SENDING_MEDIA,
|
||||
SECTION_TAG_LINKS,
|
||||
SECTION_TAG_SECURITY,
|
||||
SECTION_TAG_NOTIFICATIONS,
|
||||
SECTION_TAG_CALLS,
|
||||
|
@ -93,6 +94,12 @@ enum
|
|||
SENDING_MEDIA_CONFIRM_SIZE_DESCRIPTION,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
LINKS_SHOW_URL_PREVIEWS_INDEX = 0,
|
||||
LINKS_SHOW_URL_PREVIEWS_DESCRIPTION_INDEX
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
NOTIFICATION_SETTINGS_ENABLE_PUSH_INDEX = 0,
|
||||
|
@ -153,9 +160,7 @@ enum
|
|||
|
||||
enum
|
||||
{
|
||||
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0,
|
||||
LABS_SHOW_URL_PREVIEWS_INDEX,
|
||||
LABS_SHOW_URL_PREVIEWS_DESCRIPTION_INDEX
|
||||
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -372,6 +377,12 @@ TableViewSectionsDelegate>
|
|||
[tmpSections addObject:sectionMedia];
|
||||
}
|
||||
|
||||
Section *sectionLinks = [Section sectionWithTag:SECTION_TAG_LINKS];
|
||||
[sectionLinks addRowWithTag:LINKS_SHOW_URL_PREVIEWS_INDEX];
|
||||
[sectionLinks addRowWithTag:LINKS_SHOW_URL_PREVIEWS_DESCRIPTION_INDEX];
|
||||
sectionLinks.headerTitle = NSLocalizedStringFromTable(@"settings_links", @"Vector", nil);
|
||||
[tmpSections addObject:sectionLinks];
|
||||
|
||||
Section *sectionSecurity = [Section sectionWithTag:SECTION_TAG_SECURITY];
|
||||
[sectionSecurity addRowWithTag:SECURITY_BUTTON_INDEX];
|
||||
sectionSecurity.headerTitle = NSLocalizedStringFromTable(@"settings_security", @"Vector", nil);
|
||||
|
@ -532,8 +543,6 @@ TableViewSectionsDelegate>
|
|||
{
|
||||
Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS];
|
||||
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
|
||||
[sectionLabs addRowWithTag:LABS_SHOW_URL_PREVIEWS_INDEX];
|
||||
[sectionLabs addRowWithTag:LABS_SHOW_URL_PREVIEWS_DESCRIPTION_INDEX];
|
||||
sectionLabs.headerTitle = NSLocalizedStringFromTable(@"settings_labs", @"Vector", nil);
|
||||
if (sectionLabs.hasAnyRows)
|
||||
{
|
||||
|
@ -1871,6 +1880,31 @@ TableViewSectionsDelegate>
|
|||
cell = infoCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_LINKS)
|
||||
{
|
||||
if (row == LINKS_SHOW_URL_PREVIEWS_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_show_url_previews", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenShowsURLPreviews;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableURLPreviews:) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
else if (row == LINKS_SHOW_URL_PREVIEWS_DESCRIPTION_INDEX)
|
||||
{
|
||||
MXKTableViewCell *descriptionCell = [self getDefaultTableViewCell:tableView];
|
||||
descriptionCell.textLabel.text = NSLocalizedStringFromTable(@"settings_show_url_previews_description", @"Vector", nil);
|
||||
descriptionCell.textLabel.numberOfLines = 0;
|
||||
descriptionCell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
cell = descriptionCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_NOTIFICATIONS)
|
||||
{
|
||||
if (row == NOTIFICATION_SETTINGS_ENABLE_PUSH_INDEX)
|
||||
|
@ -2396,28 +2430,6 @@ TableViewSectionsDelegate>
|
|||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
else if (row == LABS_SHOW_URL_PREVIEWS_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_show_url_previews", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenShowsURLPreviews;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableURLPreviews:) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
else if (row == LABS_SHOW_URL_PREVIEWS_DESCRIPTION_INDEX)
|
||||
{
|
||||
MXKTableViewCell *descriptionCell = [self getDefaultTableViewCell:tableView];
|
||||
descriptionCell.textLabel.text = NSLocalizedStringFromTable(@"settings_show_url_previews_description", @"Vector", nil);
|
||||
descriptionCell.textLabel.numberOfLines = 0;
|
||||
descriptionCell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
cell = descriptionCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_FLAIR)
|
||||
{
|
||||
|
|
1
changelog.d/4828.change
Normal file
1
changelog.d/4828.change
Normal file
|
@ -0,0 +1 @@
|
|||
URL Previews: Enable by default and remove from labs.
|
1
changelog.d/4835.bugfix
Normal file
1
changelog.d/4835.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix incorrect theme being shown in the notification settings screens after launch.
|
1
changelog.d/4855.bugfix
Normal file
1
changelog.d/4855.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
URL Previews: Fix layout on 4" devices.
|
|
@ -108,9 +108,9 @@ platform :ios do
|
|||
end
|
||||
end
|
||||
|
||||
desc "Point MatrixKit and MatrixSDK to their respective release/*/release branch if they exist, develop otherwise"
|
||||
desc "Point MatrixKit and MatrixSDK to their respective release/*/release branch if they exist, master otherwise"
|
||||
lane :point_dependencies_to_pending_releases do
|
||||
edit_podfile(branch_pattern: "release/*/release")
|
||||
edit_podfile(branch_pattern: "release/*/release", default_branch: "master")
|
||||
end
|
||||
|
||||
desc "Point MatrixKit and MatrixSDK to the branch with the same name as the current branch if such one exist, develop otherwise"
|
||||
|
@ -391,8 +391,9 @@ platform :ios do
|
|||
kit_slug = "matrix-org/matrix-ios-kit"
|
||||
sdk_slug = "matrix-org/matrix-ios-sdk"
|
||||
|
||||
kit_branch = find_branch(kit_slug, branch_pattern) || 'develop'
|
||||
sdk_branch = find_branch(sdk_slug, branch_pattern) || 'develop'
|
||||
default_branch = options[:default_branch] || 'develop'
|
||||
kit_branch = find_branch(kit_slug, branch_pattern) || default_branch
|
||||
sdk_branch = find_branch(sdk_slug, branch_pattern) || default_branch
|
||||
|
||||
kit_spec = { git: 'https://github.com/matrix-org/matrix-ios-kit.git', branch: kit_branch }
|
||||
kit_podspec = { podspec: 'MatrixKit.edited.podspec' }
|
||||
|
|
Loading…
Reference in a new issue