-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages selection #411
Messages selection #411
Conversation
…attoAdditions" This reverts commit 9c48f3b.
Codecov Report
@@ Coverage Diff @@
## master #411 +/- ##
=========================================
- Coverage 65.02% 64.83% -0.2%
=========================================
Files 70 70
Lines 4500 4575 +75
Branches 232 235 +3
=========================================
+ Hits 2926 2966 +40
- Misses 1557 1591 +34
- Partials 17 18 +1
Continue to review full report at Codecov.
|
@@ -101,6 +103,8 @@ open class BaseMessagePresenter<BubbleViewT, ViewModelBuilderT, InteractionHandl | |||
cell.performBatchUpdates({ () -> Void in | |||
self.messageViewModel.showsTail = decorationAttributes.canShowTail | |||
self.messageViewModel.showsAvatar = decorationAttributes.canShowAvatar | |||
self.messageViewModel.isShowingSelectionIndicator = decorationAttributes.isShowingSelectionIndicator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the way how you copy all the attributes from one entity to another looks a little bit suspicious. why don't you have the dedicated entity which represents the whole set of properties? in this way copying would look like: self.mesageViewModel.attributes = decorationAttributes.attributes
self.selectionIndicator.image = style.selectionIndicatorIcon(for: self.messageViewModel) | ||
} | ||
|
||
private lazy var selectionTapGestureRecognizer: UITapGestureRecognizer = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it really need to be lazy? it looks like it's used in init.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix it
self.bubbleViewFrame = bubbleSize.bma_rect(inContainer: containerRect, xAlignament: .center, yAlignment: .center) | ||
self.failedButtonFrame = failedButtonSize.bma_rect(inContainer: containerRect, xAlignament: .center, yAlignment: .center) | ||
self.avatarViewFrame = avatarSize.bma_rect(inContainer: containerRect, xAlignament: .center, yAlignment: parameters.avatarVerticalAlignment) | ||
self.bubbleViewFrame = bubbleSize.bma_rect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct to use bma_ prefixes in Chatto code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…eMessageCollectionViewCell into a BaseMessageDecorationAttributes
BaseMessagesCollectionViewCell
BaseMessagesCollectionViewCell
to select/deselect messages in the chat