Skip to content

Commit

Permalink
Merge pull request #429 from irace/feature/fix-some-xcode9-warnings
Browse files Browse the repository at this point in the history
Fix some Xcode 9 warnings
  • Loading branch information
AntonPalich authored Mar 10, 2018
2 parents 0444057 + 7591f6c commit c912be7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public protocol BaseMessageInteractionHandlerProtocol {

open class BaseMessagePresenter<BubbleViewT, ViewModelBuilderT, InteractionHandlerT>: BaseChatItemPresenter<BaseMessageCollectionViewCell<BubbleViewT>> where
ViewModelBuilderT: ViewModelBuilderProtocol,
ViewModelBuilderT.ViewModelT: MessageViewModelProtocol,
InteractionHandlerT: BaseMessageInteractionHandlerProtocol,
InteractionHandlerT.ViewModelT == ViewModelBuilderT.ViewModelT,
BubbleViewT: UIView,
Expand Down
2 changes: 1 addition & 1 deletion ChattoAdditions/Source/Input/ChatInputBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ extension ChatInputBar: UITextViewDelegate {
let range = self.textView.text.bma_rangeFromNSRange(nsRange)
if let maxCharactersCount = self.maxCharactersCount {
let currentCount = textView.text.count
let rangeLength = textView.text.substring(with: range).count
let rangeLength = textView.text[range].count
let nextCount = currentCount - rangeLength + text.count
return UInt(nextCount) <= maxCharactersCount
}
Expand Down
2 changes: 1 addition & 1 deletion ChattoAdditions/Source/Input/ReusableXibView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import UIKit
for constraint in constraints {
let firstItem = constraint.firstItem === self ? loadedView : constraint.firstItem
let secondItem = constraint.secondItem === self ? loadedView : constraint.secondItem
loadedView.addConstraint(NSLayoutConstraint(item: firstItem, attribute: constraint.firstAttribute, relatedBy: constraint.relation, toItem: secondItem, attribute: constraint.secondAttribute, multiplier: constraint.multiplier, constant: constraint.constant))
loadedView.addConstraint(NSLayoutConstraint(item: firstItem as Any, attribute: constraint.firstAttribute, relatedBy: constraint.relation, toItem: secondItem, attribute: constraint.secondAttribute, multiplier: constraint.multiplier, constant: constraint.constant))
}
return loadedView
} else {
Expand Down

0 comments on commit c912be7

Please sign in to comment.