[NEW] Initial support to Threads by rafaelks · Pull Request #2667 · RocketChat/Rocket.Chat.iOS · GitHub
Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

[NEW] Initial support to Threads#2667

Merged
rafaelks merged 32 commits into
developfrom
feature/threads
May 6, 2019
Merged

[NEW] Initial support to Threads#2667
rafaelks merged 32 commits into
developfrom
feature/threads

Conversation

@rafaelks

Copy link
Copy Markdown
Contributor

@RocketChat/ios

Closes #2660
Closes #2653

@rafaelks rafaelks added this to the 3.5.0 milestone Apr 15, 2019

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Newline Violation: Files should have a single trailing newline. (trailing_newline)

XCTAssertEqual(request.httpMethod, "GET", "http method is correct")
}

func testProperties() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 42 lines (function_body_length)

@codecov

codecov Bot commented Apr 15, 2019

Copy link
Copy Markdown

Codecov Report

Merging #2667 into develop will decrease coverage by 0.29%.
The diff coverage is 19.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #2667     +/-   ##
==========================================
- Coverage    25.61%   25.32%   -0.3%     
==========================================
  Files          467      478     +11     
  Lines        17532    18041    +509     
==========================================
+ Hits          4491     4569     +78     
- Misses       13041    13472    +431
Impacted Files Coverage Δ
...ws/Chat/New Chat/Cells/MessageDiscussionCell.swift 0% <ø> (ø) ⬆️
...at/Views/Cells/Subscription/SubscriptionCell.swift 0% <ø> (ø) ⬆️
Rocket.Chat/Models/Message/Message.swift 88.57% <ø> (ø) ⬆️
...et.Chat/Views/Directory/DirectoryFiltersView.swift 0% <ø> (ø) ⬆️
Rocket.Chat/Models/Message/MessageReply.swift 80% <ø> (-14.12%) ⬇️
...t/Controllers/Chat/MessagesComposerViewModel.swift 0% <ø> (ø) ⬆️
Rocket.Chat/Views/Cells/Chat/ChatMessageCell.swift 0% <ø> (ø) ⬆️
...ket.Chat/Views/Subscriptions/ServersListView.swift 0% <ø> (ø) ⬆️
...ubscriptionsList/SubscriptionsViewController.swift 2.4% <ø> (ø) ⬆️
...at/MessagesViewControllerMessageCellProtocol.swift 0% <ø> (ø) ⬆️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3085e8...19ea4e0. Read the comment docs.

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

// Copyright © 2019 Rocket.Chat. All rights reserved.
//

// TODO: Add documentation link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be resolved (Add documentation link). (todo)

return .zero
}

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 175 characters (line_length)


extension ThreadsViewController {

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 170 characters (line_length)

var isInverted = true

init(object: AnyDifferentiable, controllerContext: UIViewController?, collapsibleItemsState: [AnyHashable: Bool]) {
init(object: AnyDifferentiable, controllerContext: UIViewController?, collapsibleItemsState: [AnyHashable: Bool], inverted: Bool = true) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 142 characters (line_length)


extension ThreadsViewController {

override func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 142 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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 173 characters (line_length)

}

func openThread(identifier: String) {
guard let controller = UIStoryboard.controller(from: "Chat", identifier: "Chat") as? MessagesViewController else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 122 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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

extension ThreadsViewController: ChatMessageCellProtocol {

func openThread(identifier: String) {
guard let controller = UIStoryboard.controller(from: "Chat", identifier: "Chat") as? MessagesViewController else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 122 characters (line_length)

@rafaelks rafaelks marked this pull request as ready for review May 6, 2019 13:57
XCTAssertEqual(request.value(forHTTPHeaderField: "Content-Type"), "application/json", "content type is correct")
}

func testProperties() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 47 lines (function_body_length)

XCTAssertEqual(request.value(forHTTPHeaderField: "Content-Type"), "application/json", "content type is correct")
}

func testProperties() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 47 lines (function_body_length)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 47 lines (function_body_length)

@rafaelks rafaelks merged commit eef9a21 into develop May 6, 2019
@rafaelks rafaelks deleted the feature/threads branch May 6, 2019 15:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants