Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa

## Upcoming release

### [[Prerelease] 0.13.1](https://github.com/MessageKit/MessageKit/releases/tag/0.13.1)

### Fixed

- Optimize `collectionView` scroll behavior when abruptly stops scrolling.
[#470](https://github.com/MessageKit/MessageKit/pull/470) by [@zhongwuzw](https://github.com/zhongwuzw).

- Fixed `messageInputBar` sendButton not disabled in some situations.
[#475](https://github.com/MessageKit/MessageKit/pull/475) by [@zhongwuzw](https://github.com/zhongwuzw).

- Fixed message bubble tail orientation invalidation in `iOS9`.
[#469](https://github.com/MessageKit/MessageKit/pull/469) by [@zhongwuzw](https://github.com/zhongwuzw).

Expand Down
2 changes: 1 addition & 1 deletion MessageKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MessageKit'
s.version = '0.13.0'
s.version = '0.13.1'
s.license = { :type => "MIT", :file => "LICENSE.md" }

s.summary = 'An elegant messages UI library for iOS.'
Expand Down
4 changes: 2 additions & 2 deletions Sources/Controllers/MessagesViewController+Keyboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ extension MessagesViewController {
//Software keyboard is found
let afterBottomInset = keyboardEndFrame.height > keyboardOffsetFrame.height ? (keyboardEndFrame.height - iPhoneXBottomInset) : keyboardOffsetFrame.height
let differenceOfBottomInset = afterBottomInset - messageCollectionViewBottomInset
let contentOffset = CGPoint(x: messagesCollectionView.contentOffset.x, y: messagesCollectionView.contentOffset.y + differenceOfBottomInset)

if maintainPositionOnKeyboardFrameChanged {
if maintainPositionOnKeyboardFrameChanged && differenceOfBottomInset != 0 {
let contentOffset = CGPoint(x: messagesCollectionView.contentOffset.x, y: messagesCollectionView.contentOffset.y + differenceOfBottomInset)
messagesCollectionView.setContentOffset(contentOffset, animated: false)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Views/InputBarItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ open class InputBarButtonItem: UIButton {
}

/// An InputBarButtonItem that's spacing property is set to be .fixed with the width arguement
open static func fixedSpace(_ width: CGFloat) -> InputBarButtonItem {
open class func fixedSpace(_ width: CGFloat) -> InputBarButtonItem {
let item = InputBarButtonItem()
item.setSize(.zero, animated: false)
item.spacing = .fixed(width)
Expand Down
8 changes: 8 additions & 0 deletions Sources/Views/InputTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ open class InputTextView: UITextView {

open override var text: String! {
didSet {
postTextViewDidChangeNotification()
placeholderLabel.isHidden = !text.isEmpty
}
}

open override var attributedText: NSAttributedString! {
didSet {
postTextViewDidChangeNotification()
placeholderLabel.isHidden = !text.isEmpty
}
}
Expand Down Expand Up @@ -198,6 +200,12 @@ open class InputTextView: UITextView {
placeholderLabelConstraintSet?.right?.constant = -placeholderLabelInsets.right
}

// MARK: - Notification

private func postTextViewDidChangeNotification() {
NotificationCenter.default.post(name: .UITextViewTextDidChange, object: self)
}

// MARK: - Image Paste Support

open override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
Expand Down
1 change: 0 additions & 1 deletion Sources/Views/MessageInputBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,5 @@ open class MessageInputBar: UIView {
/// Invalidates each of the inputManagers
open func didSelectSendButton() {
delegate?.messageInputBar(self, didPressSendButtonWith: inputTextView.text)
textViewDidChange()
}
}