Skip to content

Commit 9793c9d

Browse files
authored
Removed unavailable and deprecated code (#1713)
* chore: Remove unavailable and deprecated code * chore: Remove unavailable and deprecated code Update changelog
1 parent 86d8b90 commit 9793c9d

4 files changed

Lines changed: 8 additions & 106 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa
66

77
See [MIGRATION_GUIDE.md](https://github.com/MessageKit/MessageKit/blob/main/Documentation/MIGRATION_GUIDE.md) for migration to the new V4.
88

9+
### Added
10+
11+
- New method in `MessagesLayoutDelegate` for setting message avatar size [ddfc814](https://github.com/MessageKit/MessageKit/commit/ddfc814d325ee5aa238484c90128d32e5a72a49b) by [@martinpucik](https://github.com/martinpucik)
12+
- `MessageInputBarKind` enum for customizing `messageInputBar` inside `inputContainerView` [#1707](https://github.com/MessageKit/MessageKit/pull/1707) by [@martinpucik](https://github.com/martinpucik)
13+
914
### Changed
1015

1116
- **Breaking change**: Dropped CocoaPods support
@@ -31,15 +36,12 @@ See [MIGRATION_GUIDE.md](https://github.com/MessageKit/MessageKit/blob/main/Docu
3136

3237
### Fixed
3338

34-
### Added
35-
36-
- New method in `MessagesLayoutDelegate` for setting message avatar size [ddfc814](https://github.com/MessageKit/MessageKit/commit/ddfc814d325ee5aa238484c90128d32e5a72a49b) by [@martinpucik](https://github.com/martinpucik)
37-
- `MessageInputBarKind` enum for customizing `messageInputBar` inside `inputContainerView` [#1707](https://github.com/MessageKit/MessageKit/pull/1707) by [@martinpucik](https://github.com/martinpucik)
38-
3939
### Removed
4040

4141
- NSConstraintLayoutSet.swift [#1700](https://github.com/MessageKit/MessageKit/pull/1700) by [@martinpucik](https://github.com/martinpucik)
42-
42+
- Deprecated `Sender` struct. Clients should use `SenderType` protocol [#1713](https://github.com/MessageKit/MessageKit/pull/1713) by [@martinpucik](https://github.com/martinpucik)
43+
- Unavailable `MessageInputBar` and `MessageInputBarDelegate`. Clients should use `InputBarAccessoryView` and `InputBarAccessoryViewDelegate` [#1713](https://github.com/MessageKit/MessageKit/pull/1713) by [@martinpucik](https://github.com/martinpucik)
44+
- `func scrollToBottom(animated:)` on `MessagesCollectionView`. Clients should use `func scrollToLastItem(:)` [#1713](https://github.com/MessageKit/MessageKit/pull/1713) by [@martinpucik](https://github.com/martinpucik)
4345

4446
## 3.8.0
4547

Sources/Models/Sender.swift

Lines changed: 0 additions & 57 deletions
This file was deleted.

Sources/Supporting/MessageInputBar.swift

Lines changed: 0 additions & 32 deletions
This file was deleted.

Sources/Views/MessagesCollectionView.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,6 @@ open class MessagesCollectionView: UICollectionView {
120120
scrollToItem(at: indexPath, at: pos, animated: animated)
121121
}
122122

123-
// NOTE: This method seems to cause crash in certain cases - https://github.com/MessageKit/MessageKit/issues/725
124-
// Could try using `scrollToLastItem` above
125-
@available(*, deprecated, message: "Scroll to bottom by using scrollToLastItem(:) instead", renamed: "scrollToLastItem")
126-
public func scrollToBottom(animated: Bool = false) {
127-
performBatchUpdates(nil) { [weak self] _ in
128-
guard let self = self else { return }
129-
let collectionViewContentHeight = self.collectionViewLayout.collectionViewContentSize.height
130-
self.scrollRectToVisible(CGRect(0.0, collectionViewContentHeight - 1.0, 1.0, 1.0), animated: animated)
131-
}
132-
}
133-
134123
public func reloadDataAndKeepOffset() {
135124
// stop scrolling
136125
setContentOffset(contentOffset, animated: false)

0 commit comments

Comments
 (0)