Removes warnings
This commit is contained in:
parent
5656c43bb8
commit
dd34d2ebd0
|
|
@ -64,7 +64,7 @@ public class TextMessagePresenter<ViewModelBuilderT, InteractionHandlerT where
|
|||
let identifier = self.messageViewModel.isIncoming ? "text-message-incoming" : "text-message-outcoming"
|
||||
return collectionView.dequeueReusableCellWithReuseIdentifier(identifier, forIndexPath: indexPath)
|
||||
}
|
||||
|
||||
|
||||
public override func createViewModel() -> ViewModelBuilderT.ViewModelT {
|
||||
let viewModel = self.viewModelBuilder.createViewModel(self.messageModel)
|
||||
let updateClosure = { [weak self] (old: Any, new: Any) -> () in
|
||||
|
|
@ -73,7 +73,7 @@ public class TextMessagePresenter<ViewModelBuilderT, InteractionHandlerT where
|
|||
viewModel.avatarImage.observe(self, closure: updateClosure)
|
||||
return viewModel
|
||||
}
|
||||
|
||||
|
||||
public var textCell: TextMessageCollectionViewCell? {
|
||||
if let cell = self.cell {
|
||||
if let textCell = cell as? TextMessageCollectionViewCell {
|
||||
|
|
@ -98,7 +98,7 @@ public class TextMessagePresenter<ViewModelBuilderT, InteractionHandlerT where
|
|||
additionalConfiguration?()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public func updateCurrentCell() {
|
||||
if let cell = self.textCell, decorationAttributes = self.decorationAttributes {
|
||||
self.configureCell(cell, decorationAttributes: decorationAttributes, animated: self.itemVisibility != .Appearing, additionalConfiguration: nil)
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ public class TextMessageViewModel<TextMessageModelT: TextMessageModelProtocol>:
|
|||
self.textMessage = textMessage
|
||||
self.messageViewModel = messageViewModel
|
||||
}
|
||||
|
||||
|
||||
public func willBeShown() {
|
||||
// Need to declare empty. Otherwise subclass code won't execute (as of Xcode 7.2)
|
||||
}
|
||||
|
||||
|
||||
public func wasHidden() {
|
||||
// Need to declare empty. Otherwise subclass code won't execute (as of Xcode 7.2)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import XCTest
|
|||
class ObservableTests: XCTestCase {
|
||||
|
||||
func testThatObserverClosureIsExecuted() {
|
||||
var subject = Observable<Int>(0)
|
||||
let subject = Observable<Int>(0)
|
||||
var executed = false
|
||||
subject.observe(self) { (old, new) -> () in
|
||||
executed = true
|
||||
|
|
@ -38,7 +38,7 @@ class ObservableTests: XCTestCase {
|
|||
}
|
||||
|
||||
func testThatObserverClosuresAreExecuted() {
|
||||
var subject = Observable<Int>(0)
|
||||
let subject = Observable<Int>(0)
|
||||
var executed1 = false, executed2 = false
|
||||
subject.observe(self) { (old, new) -> () in
|
||||
executed1 = true
|
||||
|
|
@ -52,7 +52,7 @@ class ObservableTests: XCTestCase {
|
|||
}
|
||||
|
||||
func testThatObserverClosureIsNotExecutedIfObserverWasDeallocated() {
|
||||
var subject = Observable<Int>(0)
|
||||
let subject = Observable<Int>(0)
|
||||
var observer: NSObject? = NSObject()
|
||||
var executed = false
|
||||
subject.observe(observer!) { (old, new) -> () in
|
||||
|
|
@ -64,7 +64,7 @@ class ObservableTests: XCTestCase {
|
|||
}
|
||||
|
||||
func testNothingHappensIfNoObserversHaveBeenAdded() {
|
||||
var subject = Observable<Int>(0)
|
||||
let subject = Observable<Int>(0)
|
||||
subject.value = 1
|
||||
XCTAssertEqual(1, subject.value)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue