diff --git a/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift b/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift index 9d6612e..3734db9 100644 --- a/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift +++ b/Keyneez/Keyneez/Tab/Home/Controllers/HomeViewController.swift @@ -94,6 +94,18 @@ extension HomeViewController { @objc private func changeUnderLinePosition() { animateUnderline() changeViewControllers() + guard let token = UserSession.shared.accessToken else { return } + repository.getAllContents(token: token) { + [weak self] arr in + guard let self else {return} + self.datasources.append(arr) + DispatchQueue.main.async { + self.VCs.forEach { + $0.contentList = self.datasources[0] + $0.recommendContentCollectionView.reloadData() + } + } + } } private func animateUnderline() { let segmentIndex = segmentControl.selectedSegmentIndex