Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Conversation

@filipealva
Copy link
Contributor

@RocketChat/ios

Add support to message headers for the following attachments:

  • File
  • Text Attachment (with fields)
  • Image Attachment

var imageURL: URL?
let hasText: Bool

init(identifier: String, title: String?, descriptionText: String?, imageURL: URL?, hasText: Bool, user: UnmanagedUser?, message: UnmanagedMessage?) {

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 153 characters (line_length)

}

extension BaseTextAttachmentMessageCell: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer) -> Bool {

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 146 characters (line_length)

continue
}

let attributedValue = NSMutableAttributedString(string: attachmentField.value).transformMarkdown(with: theme)

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 121 characters (line_length)

// TODO: In case of error, show some error placeholder
}
} else {
// TODO: Load some error placeholder

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 (Load some error placeholder). (todo)

ImageManager.loadImage(with: imageURL, into: imageView) { _, _ in
stopLoadingBlock()

// TODO: In case of error, show some error placeholder

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 (In case of error, show some er...). (todo)

collectionView.register(FileCell.nib, forCellWithReuseIdentifier: FileCell.identifier)
collectionView.register(FileMessageCell.nib, forCellWithReuseIdentifier: FileMessageCell.identifier)
collectionView.register(TextAttachmentCell.nib, forCellWithReuseIdentifier: TextAttachmentCell.identifier)
collectionView.register(TextAttachmentMessageCell.nib, forCellWithReuseIdentifier: TextAttachmentMessageCell.identifier)

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 128 characters (line_length)

@codecov
Copy link

codecov bot commented Oct 16, 2018

Codecov Report

Merging #2254 into feature/integrate-rc-view-controller will decrease coverage by 0.32%.
The diff coverage is 1.13%.

Impacted file tree graph

@@                           Coverage Diff                           @@
##           feature/integrate-rc-view-controller   #2254      +/-   ##
=======================================================================
- Coverage                                 26.43%   26.1%   -0.33%     
=======================================================================
  Files                                       425     430       +5     
  Lines                                     15941   16151     +210     
=======================================================================
+ Hits                                       4214    4217       +3     
- Misses                                    11727   11934     +207
Impacted Files Coverage Δ
...ews/Chat/New Chat/Cells/BaseImageMessageCell.swift 0% <0%> (ø)
.../Chat/New Chat/ChatItems/FileMessageChatItem.swift 0% <0%> (ø) ⬆️
...at/New Chat/ChatItems/TextAttachmentChatItem.swift 0% <0%> (ø) ⬆️
...t/Views/Chat/New Chat/Cells/ImageMessageCell.swift 0% <0%> (ø) ⬆️
...hat/New Chat/Cells/TextAttachmentMessageCell.swift 0% <0%> (ø)
...cket.Chat/Views/Chat/New Chat/Cells/FileCell.swift 0% <0%> (ø)
...Chat/New Chat/ChatItems/ImageMessageChatItem.swift 0% <0%> (ø) ⬆️
...at/Views/Chat/New Chat/Cells/FileMessageCell.swift 0% <0%> (ø) ⬆️
...Controllers/Chat/ChatSections/MessageSection.swift 1.14% <0%> (-0.26%) ⬇️
...Views/Chat/New Chat/Cells/TextAttachmentCell.swift 0% <0%> (ø) ⬆️
... and 8 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 abda423...ee81656. Read the comment docs.

Copy link
Contributor

@rafaelks rafaelks left a comment

Choose a reason for hiding this comment

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

👏

@rafaelks rafaelks added this to the 3.2.0 milestone Oct 16, 2018
@rafaelks rafaelks merged commit e4fea53 into feature/integrate-rc-view-controller Oct 16, 2018
@rafaelks rafaelks deleted the feature/attachment-message-headers branch October 16, 2018 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants