Conversation
…cting WebSocket on new sessions
We can remove the else-if-condition where we are checking for the original image. This is because whenever the user selects an image for their avatar from the photo library, the cropping tool is always called. So, there will always be an .editedImage.
[NEW] Crop image before uploading avatar
…t message message date
…ayout & other fixes
…tes_support [NEW] SSL client certificates support (two-way authentication)
[IMPROVEMENT] Swipe to read messages with uniform colour
[FIX] Prevent CustomEmoji image URL double url escaping
[NEW] Initial support to Threads
[CHORE] Upgrade project to latest Xcode & Swift 5
Revert "[CHORE] Upgrade project to latest Xcode & Swift 5"
… the flow, add docs links, fixed theming in some parts of the app and more
[RELEASE] Merge DEVELOP into BETA
[IMPROVEMENT] Adjustments on Threads implementation
[RELEASE] Merge DEVELOP into BETA
There was a problem hiding this comment.
Superfluous Disable Command Violation: SwiftLint rule 'cyclomatic_complexity' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)
| extension ThreadsViewController: ChatMessageCellProtocol { | ||
|
|
||
| func openThread(identifier: String) { | ||
| guard let controller = UIStoryboard.controller(from: "Chat", identifier: "Chat") as? MessagesViewController else { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
| return .zero | ||
| } | ||
|
|
||
| func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 160 characters (line_length)
| return 0 | ||
| } | ||
|
|
||
| func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 162 characters (line_length)
| return 0 | ||
| } | ||
|
|
||
| func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 175 characters (line_length)
| let threadIdentifier: String? | ||
|
|
||
| init(id: String, roomId: String, text: String, messageType: String? = nil) { | ||
| init(id: String, roomId: String, text: String, threadIdentifier: String? = nil, messageType: String? = nil) { |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'id' (identifier_name)
| internalType: String? = nil, | ||
| subscription: UnmanagedSubscription, | ||
| threadIdentifier: String? = nil, | ||
| id: String = String.random(18), |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'id' (identifier_name)
| return self.characters.count | ||
| } | ||
| } | ||
| #endif |
There was a problem hiding this comment.
File Line Length Violation: File should contain 400 lines or less: currently contains 1356 (file_length)
| self.advancedDelegate?.websocketDidDisconnect(socket: self, error: error) | ||
| let userInfo = error.map{ [WebsocketDisconnectionErrorKeyName: $0] } | ||
| s.notificationCenter.post(name: NSNotification.Name(WebsocketDidDisconnectNotification), object: self, userInfo: userInfo) | ||
| NotificationCenter.default.post(name: NSNotification.Name(WebsocketDidDisconnectNotification), object: self, userInfo: userInfo) |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 140 characters (line_length)
| s.doDisconnect(error as NSError?) | ||
| let len = stream.write(data: Data(bytes: writeBuffer, count: offset-total)) | ||
| if len <= 0 { | ||
| self.doDisconnect(WSError(type: .outputStreamWriteError, message: "output stream had an error during write", code: 0)) |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 138 characters (line_length)
| XCTAssertEqual(request.value(forHTTPHeaderField: "Content-Type"), "application/json", "content type is correct") | ||
| } | ||
|
|
||
| func testProperties() { |
There was a problem hiding this comment.
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 47 lines (function_body_length)
| } | ||
|
|
||
| } | ||
|
|
There was a problem hiding this comment.
Trailing Newline Violation: Files should have a single trailing newline. (trailing_newline)
| XCTAssertEqual(request.httpMethod, "GET", "http method is correct") | ||
| } | ||
|
|
||
| func testProperties() { |
There was a problem hiding this comment.
Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 42 lines (function_body_length)
| // MARK: Connection | ||
|
|
||
| static func connect(_ url: URL, completion: @escaping SocketCompletion) { | ||
| static func connect(_ url: URL, sslCertificate: SSLClientCertificate? = nil, completion: @escaping SocketCompletion) { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
| - oldestMessage: This is the parameter that will be sent to the server in | ||
| order to get the correct page of data. | ||
| */ | ||
| // swiftlint:disable function_body_length cyclomatic_complexity |
There was a problem hiding this comment.
Superfluous Disable Command Violation: SwiftLint rule 'cyclomatic_complexity' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)
| } | ||
|
|
||
| func openThread(identifier: String) { | ||
| guard let controller = UIStoryboard.controller(from: "Chat", identifier: "Chat") as? MessagesViewController else { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)
| var isCompressedReplyLayout = true | ||
|
|
||
| init(object: AnyDifferentiable, controllerContext: UIViewController?, collapsibleItemsState: [AnyHashable: Bool]) { | ||
| init(object: AnyDifferentiable, controllerContext: UIViewController?, collapsibleItemsState: [AnyHashable: Bool], inverted: Bool = true, compressedLayout: Bool = true) { |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 173 characters (line_length)
| api.sslCertificatePassword = self?.certificateFilePassword ?? "" | ||
| } | ||
|
|
||
| api.client(InfoClient.self).fetchLoginServices(completion: { loginServices, shouldRetrieveLoginServices in |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 126 characters (line_length)
|
|
||
| @IBAction func buttonCertificateDidPressed(_ sender: Any) { | ||
| if let url = certificateFileURL { | ||
| let alert = UIAlertController(title: url.pathComponents.last ?? "", message: nil, preferredStyle: .actionSheet) |
There was a problem hiding this comment.
Line Length Violation: Line should be 120 characters or less: currently 123 characters (line_length)
| let threadIdentifier: String? | ||
|
|
||
| init(id: String, roomId: String, text: String, messageType: String? = nil) { | ||
| init(id: String, roomId: String, text: String, threadIdentifier: String? = nil, messageType: String? = nil) { |
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'id' (identifier_name)
Codecov Report
@@ Coverage Diff @@
## master #2697 +/- ##
=========================================
Coverage ? 25.38%
=========================================
Files ? 478
Lines ? 18070
Branches ? 0
=========================================
Hits ? 4587
Misses ? 13483
Partials ? 0Continue to review full report at Codecov.
|

@RocketChat/ios