|
@ -28,6 +28,11 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
// MARK: Properties |
|
|
// MARK: Properties |
|
|
var refreshControl = UIRefreshControl() |
|
|
var refreshControl = UIRefreshControl() |
|
|
var presenter: HomeModuleInterface? |
|
|
var presenter: HomeModuleInterface? |
|
|
|
|
|
var user: User? { |
|
|
|
|
|
didSet { |
|
|
|
|
|
// update |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
var sections: [Sections] = [.balance, .collection] |
|
|
var sections: [Sections] = [.balance, .collection] |
|
|
|
|
|
|
|
|
var menuHeight: CGFloat? { |
|
|
var menuHeight: CGFloat? { |
|
@ -303,7 +308,21 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout { |
|
|
|
|
|
|
|
|
// MARK: HomeViewInterface |
|
|
// MARK: HomeViewInterface |
|
|
extension HomeViewController: HomeViewInterface { |
|
|
extension HomeViewController: HomeViewInterface { |
|
|
|
|
|
func show(model: User) { |
|
|
|
|
|
self.user = model |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func show(error: String) { |
|
|
|
|
|
self.alert(message: error) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func showLoading() { |
|
|
|
|
|
self.showProgressHud() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func hideLoading() { |
|
|
|
|
|
self.hideProgressHud() |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|