Skip to content

Commit 3786989

Browse files
committed
Add CHANGELOG entry
1 parent 9bfccfb commit 3786989

3 files changed

Lines changed: 29 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ the `MessageData.location` case.
3232
classes that are responsible for sizing the `MessagesCollectionViewCell` types provided by MessageKit.
3333
[#579](https://github.com/MessageKit/MessageKit/pull/579) by [@SD10](https://github.com/sd10).
3434

35-
- Added two new methods `cellTopLabelHeight(for:at:in)` and `cellBottomLabelHeight(for:at:in)` to `MessagesLayoutDelegate`
35+
- Added three new methods `cellTopLabelHeight(for:at:in)`, `messageTopLabelHeight(for:at:in)`, and `messageBottomLabelHeight(for:at:in)` to `MessagesLayoutDelegate`.
3636
[#580](https://github.com/MessageKit/MessageKit/pull/580) by [@SD10](https://github.com/sd10).
3737

3838
- Added new class `InsetLabel`.
@@ -62,12 +62,6 @@ by removing the `MessageType` and `IndexPath` parameters and replacing them with
6262
changed to match their class name exactly.
6363
[#615](https://github.com/MessageKit/MessageKit/pull/615) by [@SD10](https://github.com/sd10).
6464

65-
- **Breaking Change** Changed the superclass of `MessageDateHeaderView` from `MessageHeaderView` to `MessageReusableView`.
66-
[#615](https://github.com/MessageKit/MessageKit/pull/615) by [@SD10](https://github.com/sd10).
67-
68-
- **Breaking Change** Change `NSLayoutConstraintSet` class from `public` to `internal`.
69-
[#607](https://github.com/MessageKit/MessageKit/pull/607) by [@zhongwuzw](https://github.com/zhongwuzw).
70-
7165
- **Breaking Change** `MessageHeaderView` and `MessageFooterView` now subclass `MessageReusableView` class.
7266
[#596](https://github.com/MessageKit/MessageKit/pull/596) by [@SD10](https://github.com/sd10).
7367

@@ -82,6 +76,15 @@ The `MessageCollectionViewCell` class is now a bare bones subclass.
8276
- **Breaking Change** The type of `cellTopLabel` and `cellBottomLabel` has been changed to `InsetLabel`.
8377
[#580](https://github.com/MessageKit/MessageKit/pull/580) by [@SD10](https://github.com/sd10).
8478

79+
- **Breaking Change** Renamed `cellTopLabel` to `messageTopLabel` and renamed `cellBottomLabel` to `messageBottomLabel`.
80+
[#659](https://github.com/MessageKit/MessageKit/pull/659) by [@SD10](https://github.com/sd10).
81+
82+
- **Breaking Change** Renamed the `didTapTopLabel` and `didTapBottomLabel` methods of `MessageCellDelegate` to `didTapMessageTopLabel` and `didTapMessageBottomLabel`.
83+
[#659](https://github.com/MessageKit/MessageKit/pull/659) by [@SD10](https://github.com/sd10).
84+
85+
- **Breaking Change** Renamed `cellBottomLabelAttributedText` method of `MessagesDataSource` to `messageBottomLabelAttributedText`.
86+
[#659](https://github.com/MessageKit/MessageKit/pull/659) by [@zhongwuzw](https://github.com/zhongwuzw).
87+
8588
- The `MessageData.emoji` case no longer uses a default font of 2x the `messageLabelFont` size.
8689
You must now set this font explicitly through the `emojiMessageSizeCalculator` on `MessagesCollectionViewFlowLayout`.
8790
[#530](https://github.com/MessageKit/MessageKit/pull/579) by [@SD10](https://github.com/sd10).
@@ -94,6 +97,9 @@ You must now set this font explicitly through the `emojiMessageSizeCalculator` o
9497

9598
### Removed
9699

100+
- **Breaking Change** Removed `NSLayoutConstraintSet` by changing access control from `public` to `internal`.
101+
[#607](https://github.com/MessageKit/MessageKit/pull/607) by [@zhongwuzw](https://github.com/zhongwuzw).
102+
97103
- **Breaking Change** Removed the `showsDateHeaderAfterTimeInterval` property of `MessagesCollectionView`.
98104
[#615](https://github.com/MessageKit/MessageKit/pull/615) by [@SD10](https://github.com/sd10).
99105

@@ -114,6 +120,9 @@ You must now set this font explicitly through the `emojiMessageSizeCalculator` o
114120
You can now set this property through `textMessageSizeCalculator` property.
115121
[#579](https://github.com/MessageKit/MessageKit/pull/579) by [@SD10](https://github.com/sd10).
116122

123+
- **Breaking Change** Removed `MessageDateHeaderView` class in favor of using `cellTopLabel`.
124+
[#659](https://github.com/MessageKit/MessageKit/pull/659) by [@zhongwuzw](https://github.com/zhongwuzw).
125+
117126
### Fixed
118127

119128
- Fixed equality checking on `MessagesCollectionViewLayoutAttributes`.

Sources/Protocols/MessageCellDelegate.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ public protocol MessageCellDelegate: MessageLabelDelegate {
4848
/// method `messageForItem(at:indexPath:messagesCollectionView)`.
4949
func didTapAvatar(in cell: MessageCollectionViewCell)
5050

51-
/// Triggered when a tap occurs in the messageBottomLabel.
52-
///
53-
/// - Parameters:
54-
/// - cell: The cell where the tap occurred.
55-
///
56-
/// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
57-
/// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
58-
/// method `messageForItem(at:indexPath:messagesCollectionView)`.
59-
func didTapBottomLabel(in cell: MessageCollectionViewCell)
60-
6151
/// Triggered when a tap occurs in the cellTopLabel.
6252
///
6353
/// - Parameters:
@@ -78,6 +68,16 @@ public protocol MessageCellDelegate: MessageLabelDelegate {
7868
/// method `messageForItem(at:indexPath:messagesCollectionView)`.
7969
func didTapMessageTopLabel(in cell: MessageCollectionViewCell)
8070

71+
/// Triggered when a tap occurs in the messageBottomLabel.
72+
///
73+
/// - Parameters:
74+
/// - cell: The cell where the tap occurred.
75+
///
76+
/// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
77+
/// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
78+
/// method `messageForItem(at:indexPath:messagesCollectionView)`.
79+
func didTapMessageBottomLabel(in cell: MessageCollectionViewCell)
80+
8181
}
8282

8383
public extension MessageCellDelegate {
@@ -86,9 +86,9 @@ public extension MessageCellDelegate {
8686

8787
func didTapAvatar(in cell: MessageCollectionViewCell) {}
8888

89-
func didTapBottomLabel(in cell: MessageCollectionViewCell) {}
90-
9189
func didTapCellTopLabel(in cell: MessageCollectionViewCell) {}
9290

9391
func didTapMessageTopLabel(in cell: MessageCollectionViewCell) {}
92+
93+
func didTapMessageBottomLabel(in cell: MessageCollectionViewCell) {}
9494
}

Sources/Views/Cells/MessageContentCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ open class MessageContentCell: MessageCollectionViewCell {
148148
case messageTopLabel.frame.contains(touchLocation):
149149
delegate?.didTapMessageTopLabel(in: self)
150150
case messageBottomLabel.frame.contains(touchLocation):
151-
delegate?.didTapBottomLabel(in: self)
151+
delegate?.didTapMessageBottomLabel(in: self)
152152
default:
153153
break
154154
}

0 commit comments

Comments
 (0)