From 659507bde9929a88373d2070c355260a7d217d41 Mon Sep 17 00:00:00 2001 From: Darya Rednikina Date: Wed, 1 May 2019 23:58:04 +0300 Subject: [PATCH] for iko without correct pagination (works only for general channel). --- Cartfile | 2 +- .../Controller/ News and channels/ChannelController.swift | 6 ++---- GDproject/Controller/ News and channels/NewsVC.swift | 2 +- GDproject/Controller/Log In/LogInViewController.swift | 2 +- GDproject/Simple model/Model.swift | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cartfile b/Cartfile index f8cd73e..a96d1ab 100644 --- a/Cartfile +++ b/Cartfile @@ -5,4 +5,4 @@ github "macteo/Marklight" github "Alamofire/Alamofire" "5.0.0-beta.5" github "52inc/Pulley" github "HeroTransitions/Hero" -github "ReactiveCocoa/ReactiveCocoa" "1c089a8" \ No newline at end of file +github "ReactiveCocoa/ReactiveCocoa" ~> 9.0 \ No newline at end of file diff --git a/GDproject/Controller/ News and channels/ChannelController.swift b/GDproject/Controller/ News and channels/ChannelController.swift index 24a06ac..66182c6 100644 --- a/GDproject/Controller/ News and channels/ChannelController.swift +++ b/GDproject/Controller/ News and channels/ChannelController.swift @@ -25,7 +25,7 @@ class ChannelController: UIViewController, UITableViewDelegate, UITableViewDataS var channel: Model.Channels? var myProtocol: DataDelegate? - var fullTags: [String] = Array(Model.Channels.fullTags) + var fullTags: [String] = CompletionTree.getCompletion(tree: Model.hashTagTree!, word: "") var dataSourcePeople: [Model.Users] = [] @@ -252,9 +252,7 @@ class ChannelController: UIViewController, UITableViewDelegate, UITableViewDataS } tableView.reloadData() case 1: - dataSourceTags = fullTags.filter({ (s) -> Bool in - s.lowercased().contains(text.lowercased()) - }) + dataSourceTags = CompletionTree.getCompletion(tree: Model.hashTagTree!, word: text) tableView.reloadData() default: break diff --git a/GDproject/Controller/ News and channels/NewsVC.swift b/GDproject/Controller/ News and channels/NewsVC.swift index 9293aa0..3bf44f2 100644 --- a/GDproject/Controller/ News and channels/NewsVC.swift +++ b/GDproject/Controller/ News and channels/NewsVC.swift @@ -121,7 +121,7 @@ class NewsVC: UIViewController, UITableViewDelegate, UITableViewDataSource { self?.dataSourse.append(contentsOf: $0.posts) $0.users.forEach { self?.dictionary[$0.key] = $0.value } } - + prevLast = indexPath.row } } diff --git a/GDproject/Controller/Log In/LogInViewController.swift b/GDproject/Controller/Log In/LogInViewController.swift index bdce50e..5375350 100644 --- a/GDproject/Controller/Log In/LogInViewController.swift +++ b/GDproject/Controller/Log In/LogInViewController.swift @@ -95,7 +95,7 @@ class LogInViewController: UIViewController { setUpView() configureKeyboard() - let mailFieldValuesSignal: Signal = mailTextField.reactive.continuousTextValues + let mailFieldValuesSignal: Signal = mailTextField.reactive.continuousTextValues mailFieldValuesSignal.observeValues(logicOfLogInInputValidation()) diff --git a/GDproject/Simple model/Model.swift b/GDproject/Simple model/Model.swift index e6e550f..9e0eec6 100644 --- a/GDproject/Simple model/Model.swift +++ b/GDproject/Simple model/Model.swift @@ -133,7 +133,7 @@ class Model{ struct Channels: Codable { - static var fullTags = Set() + // static var fullTags = Set() static var fullPeople = [Users]() static var fullPeopleDict = [Int:Users]()