Bump RxSwift version + fix depracated methods warnings

Change-Id: I09f77c6fda83a1d24063fc4e1e4e9110b65e37d9
parent 497b2005
github "ReactiveX/RxSwift" == 3.0.1
github "RxSwiftCommunity/RxDataSources" ~> 1.0
github "pkluz/PKHUD" ~> 4.0
github "ReactiveX/RxSwift"
github "RxSwiftCommunity/RxDataSources" == 1.0.3
github "pkluz/PKHUD"
github "ReactiveX/RxSwift" "3.0.1"
github "ReactiveX/RxSwift" "3.5.0"
github "RxSwiftCommunity/RxDataSources" "1.0.3"
github "pkluz/PKHUD" "4.2.3"
......@@ -53,8 +53,8 @@ class SmartlistViewController: UIViewController, UITableViewDelegate {
self.tableView.register(UINib.init(nibName: "ConversationCell", bundle: nil), forCellReuseIdentifier: "ConversationCellId")
//Bind the TableView to the ViewModel
self.viewModel.conversationsObservable.bindTo(tableView.rx.items(cellIdentifier: "ConversationCellId", cellType: ConversationCell.self) ) { index, viewModel, cell in
viewModel.userName.bindTo(cell.nameLabel.rx.text).addDisposableTo(self.disposeBag)
self.viewModel.conversationsObservable.bind(to: tableView.rx.items(cellIdentifier: "ConversationCellId", cellType: ConversationCell.self) ) { index, viewModel, cell in
viewModel.userName.bind(to: cell.nameLabel.rx.text).addDisposableTo(self.disposeBag)
cell.newMessagesLabel.text = viewModel.unreadMessages
cell.lastMessageDateLabel.text = viewModel.lastMessageReceivedDate
cell.newMessagesIndicator.isHidden = !viewModel.hasUnreadMessages
......
......@@ -115,7 +115,7 @@ class CreateRingAccountViewController: UITableViewController {
//Enables create account button
self.mAccountViewModel.canCreateAccount
.bindTo(self.mCreateAccountButton.rx.isEnabled)
.bind(to: self.mCreateAccountButton.rx.isEnabled)
.addDisposableTo(mDisposeBag)
}
......@@ -212,7 +212,7 @@ class CreateRingAccountViewController: UITableViewController {
comment: "")
cell.titleLabel.textColor = .white
_ = cell.registerSwitch.rx.value.bindTo(self.mAccountViewModel.registerUsername)
_ = cell.registerSwitch.rx.value.bind(to: self.mAccountViewModel.registerUsername)
.addDisposableTo(mDisposeBag)
return cell
......@@ -228,7 +228,7 @@ class CreateRingAccountViewController: UITableViewController {
_ = cell.textField.rx.text.orEmpty
.throttle(textFieldThrottlingDuration, scheduler: MainScheduler.instance)
.distinctUntilChanged()
.bindTo(self.mAccountViewModel.username)
.bind(to: self.mAccountViewModel.username)
.addDisposableTo(mDisposeBag)
//Switch to new password cell when return button is touched
......@@ -237,7 +237,7 @@ class CreateRingAccountViewController: UITableViewController {
}).addDisposableTo(mDisposeBag)
_ = self.mAccountViewModel.usernameValidationMessage
.bindTo(cell.errorMessageLabel.rx.text)
.bind(to: cell.errorMessageLabel.rx.text)
.addDisposableTo(mDisposeBag)
return cell
......@@ -261,11 +261,11 @@ class CreateRingAccountViewController: UITableViewController {
comment: "")
//Binds the password field value to the ViewModel
_ = cell.textField.rx.text.orEmpty.bindTo(self.mAccountViewModel.password)
_ = cell.textField.rx.text.orEmpty.bind(to: self.mAccountViewModel.password)
.addDisposableTo(mDisposeBag)
//Binds the observer to show the error label if the field is not empty
_ = self.mAccountViewModel.hidePasswordError.bindTo(cell.errorMessageLabel.rx.isHidden)
_ = self.mAccountViewModel.hidePasswordError.bind(to: cell.errorMessageLabel.rx.isHidden)
.addDisposableTo(mDisposeBag)
//Switch to the repeat pasword cell when return button is touched
......@@ -288,11 +288,11 @@ class CreateRingAccountViewController: UITableViewController {
comment: "")
//Binds the repeat password field value to the ViewModel
_ = cell.textField.rx.text.orEmpty.bindTo(self.mAccountViewModel.repeatPassword)
_ = cell.textField.rx.text.orEmpty.bind(to: self.mAccountViewModel.repeatPassword)
.addDisposableTo(mDisposeBag)
//Binds the observer to the text field 'hidden' property
_ = self.mAccountViewModel.hideRepeatPasswordError.bindTo(cell.errorMessageLabel.rx.isHidden)
_ = self.mAccountViewModel.hideRepeatPasswordError.bind(to: cell.errorMessageLabel.rx.isHidden)
.addDisposableTo(mDisposeBag)
return cell
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment