diff --git a/Ring/Cartfile b/Ring/Cartfile index e336d18989daa3646959a8bfaedd264f9de212e9..7848fe14205202c505dcb9840b4e70591515af70 100644 --- a/Ring/Cartfile +++ b/Ring/Cartfile @@ -1,3 +1,3 @@ -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" diff --git a/Ring/Cartfile.resolved b/Ring/Cartfile.resolved index 306fc01f453935785c5a64ed932d38438a39a770..318af5d1b917f3651ccde08e24e93c1a0d4ef861 100644 --- a/Ring/Cartfile.resolved +++ b/Ring/Cartfile.resolved @@ -1,3 +1,3 @@ -github "ReactiveX/RxSwift" "3.0.1" +github "ReactiveX/RxSwift" "3.5.0" github "RxSwiftCommunity/RxDataSources" "1.0.3" github "pkluz/PKHUD" "4.2.3" diff --git a/Ring/Ring/SmartlistViewController.swift b/Ring/Ring/SmartlistViewController.swift index 9a76c111711b46b00d99302656cfd61b1740caa1..0768bdf025826de9cd6042ab24399f63889b5c33 100644 --- a/Ring/Ring/SmartlistViewController.swift +++ b/Ring/Ring/SmartlistViewController.swift @@ -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 diff --git a/Ring/Ring/Walkthrough/CreateRingAccountViewController.swift b/Ring/Ring/Walkthrough/CreateRingAccountViewController.swift index e3ac205636148d5cbdb34137d5dbdd238f402ba9..290bc22b0c54bd1464fb6d24a101a035923b55d8 100644 --- a/Ring/Ring/Walkthrough/CreateRingAccountViewController.swift +++ b/Ring/Ring/Walkthrough/CreateRingAccountViewController.swift @@ -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