Merge branch 'develop' into ismail/5068_start_thread

This commit is contained in:
ismailgulek
2021-12-09 15:25:14 +03:00
765 changed files with 94930 additions and 1211 deletions
@@ -15,7 +15,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
@@ -15,7 +15,6 @@ limitations under the License.
*/
import UIKit
import MatrixKit
@objc protocol BaseBubbleCellType: Themable {
var bubbleCellContentView: BubbleCellContentView? { get }
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" 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="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -17,7 +17,7 @@
<rect key="frame" x="0.0" y="0.0" width="595" height="97"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="5GX-gn-bK1">
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="5GX-gn-bK1">
<rect key="frame" x="0.0" y="0.0" width="595" height="97"/>
<subviews>
<view hidden="YES" contentMode="scaleToFill" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="u1e-Q2-PhY">
@@ -74,11 +74,11 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ohU-Sc-mgb">
<rect key="frame" x="46" y="4" width="484" height="30"/>
<rect key="frame" x="46" y="4" width="534" height="30"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User name:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="8" translatesAutoresizingMaskIntoConstraints="NO" id="meG-P8-61b">
<rect key="frame" x="56" y="10" width="474" height="18"/>
<rect key="frame" x="56" y="10" width="524" height="18"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="UserNameLabel"/>
<constraints>
@@ -105,10 +105,10 @@
<rect key="frame" x="0.0" y="0.0" width="595" height="97"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4d4-XQ-ido">
<rect key="frame" x="41" y="0.0" width="0.0" height="97"/>
<rect key="frame" x="0.0" y="0.0" width="0.0" height="97"/>
<subviews>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uHE-o7-sCe">
<rect key="frame" x="0.0" y="0.0" width="16" height="97"/>
<rect key="frame" x="0.0" y="16" width="16" height="97"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="encryption_warning" translatesAutoresizingMaskIntoConstraints="NO" id="Ujc-3c-e5B">
<rect key="frame" x="0.0" y="3" width="16" height="16"/>
@@ -125,37 +125,35 @@
<constraint firstItem="Ujc-3c-e5B" firstAttribute="centerX" secondItem="uHE-o7-sCe" secondAttribute="centerX" id="z4k-EX-K17"/>
</constraints>
</view>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Y6-Py-paB">
<rect key="frame" x="0.0" y="16" width="50" height="97"/>
<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>
<constraint firstAttribute="width" constant="50" id="LtA-zk-OCc"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="uHE-o7-sCe" firstAttribute="height" secondItem="4d4-XQ-ido" secondAttribute="height" id="DhB-EC-rCE"/>
<constraint firstItem="7Y6-Py-paB" firstAttribute="top" secondItem="4d4-XQ-ido" secondAttribute="top" constant="16" id="Wx9-0o-vzm"/>
</constraints>
</stackView>
<view clipsSubviews="YES" contentMode="scaleAspectFit" translatesAutoresizingMaskIntoConstraints="NO" id="oeI-eO-mFK">
<rect key="frame" x="56" y="3" width="474" height="91"/>
<rect key="frame" x="56" y="3" width="524" height="91"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<view hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Y6-Py-paB">
<rect key="frame" x="530" y="3" width="50" height="91"/>
<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>
<constraint firstAttribute="width" constant="50" id="LtA-zk-OCc"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="oeI-eO-mFK" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vcq-cR-uBc" secondAttribute="leading" constant="56" id="0Fr-0L-9tU"/>
<constraint firstItem="7Y6-Py-paB" firstAttribute="top" secondItem="vcq-cR-uBc" secondAttribute="top" constant="3" id="16j-F9-tL8"/>
<constraint firstAttribute="bottom" secondItem="oeI-eO-mFK" secondAttribute="bottom" constant="3" id="8M5-uW-82s"/>
<constraint firstItem="oeI-eO-mFK" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="4d4-XQ-ido" secondAttribute="trailing" constant="6" id="9By-U1-wTY"/>
<constraint firstItem="7Y6-Py-paB" firstAttribute="leading" secondItem="oeI-eO-mFK" secondAttribute="trailing" id="9V6-A8-9i0"/>
<constraint firstAttribute="trailing" secondItem="oeI-eO-mFK" secondAttribute="trailing" constant="15" id="Pbe-4d-q6Y"/>
<constraint firstAttribute="bottom" secondItem="4d4-XQ-ido" secondAttribute="bottom" id="Tkw-p1-CYF"/>
<constraint firstItem="4d4-XQ-ido" firstAttribute="leading" secondItem="vcq-cR-uBc" secondAttribute="leading" constant="41" id="cbh-iX-gKz"/>
<constraint firstItem="4d4-XQ-ido" firstAttribute="leading" secondItem="vcq-cR-uBc" secondAttribute="leading" id="cbh-iX-gKz"/>
<constraint firstItem="4d4-XQ-ido" firstAttribute="top" secondItem="vcq-cR-uBc" secondAttribute="top" id="hOM-gq-1au"/>
<constraint firstAttribute="height" priority="250" id="lRu-Kd-3JZ"/>
<constraint firstAttribute="bottom" secondItem="7Y6-Py-paB" secondAttribute="bottom" constant="3" id="lee-yN-381"/>
<constraint firstAttribute="trailing" secondItem="7Y6-Py-paB" secondAttribute="trailing" constant="15" id="rG0-0L-I4O"/>
<constraint firstItem="oeI-eO-mFK" firstAttribute="top" secondItem="vcq-cR-uBc" secondAttribute="top" constant="3" id="uZZ-I6-Xtq"/>
<constraint firstItem="oeI-eO-mFK" firstAttribute="leading" secondItem="vcq-cR-uBc" secondAttribute="leading" priority="750" id="vsh-pW-S46"/>
</constraints>
@@ -227,7 +225,7 @@
<connections>
<outlet property="avatarImageView" destination="yXz-Za-4yR" id="f56-93-gxa"/>
<outlet property="bubbleInfoContainer" destination="7Y6-Py-paB" id="uLv-MM-HIL"/>
<outlet property="bubbleInfoContainerTopConstraint" destination="16j-F9-tL8" id="zxd-pd-SSx"/>
<outlet property="bubbleInfoContainerTopConstraint" destination="Wx9-0o-vzm" id="nLG-nC-lwV"/>
<outlet property="bubbleOverlayContainer" destination="XQw-Mj-NZY" id="6d1-EN-LPY"/>
<outlet property="encryptionImageView" destination="Ujc-3c-e5B" id="7zc-Y7-1jT"/>
<outlet property="encryptionStatusContainerView" destination="uHE-o7-sCe" id="Dl7-QS-WKl"/>
@@ -247,6 +245,6 @@
</view>
</objects>
<resources>
<image name="encryption_warning" width="16" height="16"/>
<image name="encryption_warning" width="12" height="12"/>
</resources>
</document>
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
Action identifier used when the user tapped on the marker displayed in front of an encrypted event.
@@ -0,0 +1,59 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
class PollBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplayable {
private var pollView: UIView?
private var event: MXEvent?
override func render(_ cellData: MXKCellData!) {
super.render(cellData)
guard #available(iOS 14.0, *),
let contentView = bubbleCellContentView?.innerContentView,
let bubbleData = cellData as? RoomBubbleCellData,
let event = bubbleData.events.last,
event.eventType == __MXEventType.pollStart,
let view = PollTimelineProvider.shared.buildPollTimelineViewForEvent(event) else {
return
}
self.event = event
pollView?.removeFromSuperview()
contentView.vc_addSubViewMatchingParent(view)
pollView = view
}
override func setupViews() {
super.setupViews()
bubbleCellContentView?.backgroundColor = .clear
bubbleCellContentView?.showSenderInfo = true
bubbleCellContentView?.showPaginationTitle = false
}
// The normal flow for tapping on cell content views doesn't work for bubbles without attributed strings
func onContentViewTap(_ sender: UITapGestureRecognizer) {
guard let event = self.event else {
return
}
delegate.cell(self, didRecognizeAction: kMXKRoomBubbleCellTapOnContentView, userInfo: [kMXKRoomBubbleCellEventKey: event])
}
}
@@ -0,0 +1,27 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
class PollWithPaginationTitleBubbleCell: PollBubbleCell {
override func setupViews() {
super.setupViews()
bubbleCellContentView?.showPaginationTitle = true
}
}
@@ -0,0 +1,27 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
class PollWithoutSenderInfoBubbleCell: PollBubbleCell {
override func setupViews() {
super.setupViews()
bubbleCellContentView?.showSenderInfo = false
}
}
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomEmptyBubbleCell` displays empty bubbles.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomIncomingAttachmentBubbleCell` displays incoming attachment bubbles with sender's information.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomIncomingAttachmentWithPaginationTitleBubbleCell` displays incoming attachment bubbles with sender's information and a pagination title.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomIncomingAttachmentWithoutSenderInfoBubbleCell` displays incoming message bubbles without sender's information.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomIncomingTextMsgBubbleCell` displays incoming message bubbles with sender's information.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomIncomingTextMsgWithPaginationTitleBubbleCell` displays incoming message bubbles with sender's information.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomIncomingTextMsgWithoutSenderInfoBubbleCell` displays incoming message bubbles without sender's information.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomOutgoingAttachmentBubbleCell` displays outgoing attachment bubbles.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
#import "RoomOutgoingAttachmentBubbleCell.h"
/**
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomOutgoingTextMsgBubbleCell` displays outgoing message bubbles with user's picture and name.
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`RoomOutgoingTextMsgWithoutSenderInfoBubbleCell` displays outgoing message bubbles without user's name.
@@ -16,7 +16,8 @@
@import UIKit;
@import MatrixKit;
#import "MatrixKit.h"
@interface RoomPredecessorBubbleCell : MXKRoomBubbleTableViewCell
@@ -27,7 +27,7 @@ class VoiceMessageBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplaya
return
}
guard data.attachment.type == MXKAttachmentTypeVoiceMessage else {
guard data.attachment.type == MXKAttachmentTypeVoiceMessage || data.attachment.type == MXKAttachmentTypeAudio else {
fatalError("Invalid attachment type passed to a voice message cell.")
}
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
@interface EventDetailsView : MXKEventDetailsView
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
`DisabledRoomInputToolbarView` instance is an input toolbar to show to the end user
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
#import "MediaPickerViewController.h"
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
@interface RoomAvatarTitleView : MXKRoomTitleView
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
#import "RoomPreviewData.h"
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "MatrixKit.h"
/**
This title view display the room display name only.
@@ -24,4 +24,4 @@
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *displayNameCenterXConstraint;
@end
@end