Skip to content

Commit

Permalink
Rename model -> configuration in CompoundMessageCollectionViewCell
Browse files Browse the repository at this point in the history
  • Loading branch information
wiruzx committed Feb 6, 2019
1 parent cbbd39b commit a91daaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public final class CompoundMessagePresenter<ViewModelBuilderT, InteractionHandle
super.configureCell(compoundCell, decorationAttributes: decorationAttributes, animated: animated) { [weak self] in
defer { additionalConfiguration?() }
guard let self = self else { return }
guard compoundCell.lastDisplayedModel != self.messageModel else { return }
compoundCell.lastDisplayedModel = self.messageModel
guard compoundCell.lastAppliedConfiguration != self.messageModel else { return }
compoundCell.lastAppliedConfiguration = self.messageModel
let modules = self.contentFactories.map { $0.createMessageModule(forModel: self.messageModel) }
let bubbleView = compoundCell.bubbleView!
bubbleView.viewModel = self.messageViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
// THE SOFTWARE.

@available(iOS 11, *)
public final class CompoundMessageCollectionViewCell<Model: Equatable>: BaseMessageCollectionViewCell<CompoundBubbleView> {
var lastDisplayedModel: Model?
public final class CompoundMessageCollectionViewCell<Configuration: Equatable>: BaseMessageCollectionViewCell<CompoundBubbleView> {
// This is required to check in presenter wether we need to update content views.
// If configuration didn't change, content views will be the same
var lastAppliedConfiguration: Configuration?
public override func createBubbleView() -> CompoundBubbleView! {
return CompoundBubbleView()
}
Expand Down

0 comments on commit a91daaf

Please sign in to comment.