mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Deprecated scrollToBottom() in favor of scrollToLastItem() (#1505)
* refactor: deprecated scrollToBottom() in favor of scrollToLastItem * refactor: deprecated scrollToBottom() in favor of scrollToLastItem Changelog
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2019 MessageKit
|
||||
Copyright (c) 2017-2020 MessageKit
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -60,7 +60,7 @@ final class AdvancedExampleViewController: ChatViewController {
|
||||
DispatchQueue.main.async {
|
||||
self.messageList = messages
|
||||
self.messagesCollectionView.reloadData()
|
||||
self.messagesCollectionView.scrollToBottom()
|
||||
self.messagesCollectionView.scrollToLastItem()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ final class AdvancedExampleViewController: ChatViewController {
|
||||
updateTitleView(title: "MessageKit", subtitle: isHidden ? "2 Online" : "Typing...")
|
||||
setTypingIndicatorViewHidden(isHidden, animated: true, whilePerforming: updates) { [weak self] success in
|
||||
if success, self?.isLastSectionVisible() == true {
|
||||
self?.messagesCollectionView.scrollToBottom(animated: true)
|
||||
self?.messagesCollectionView.scrollToLastItem(animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user