From 1b51d7950a5c393d314191bc3d7a52d468239b39 Mon Sep 17 00:00:00 2001 From: BilalKhanWDI Date: Wed, 10 Jul 2024 20:01:20 +0530 Subject: [PATCH] karaoke --- .../Karaoke/Controller/KaraokeDetailsVC.swift | 4 +-- .../Karaoke/Controller/KaraokeListingVC.swift | 10 +++--- WOKA/Karaoke/Karaoke.storyboard | 31 +++++++++---------- WOKA/Karaoke/ViewModel/KaraokeListingVM.swift | 23 ++++++++++---- .../ViewModel/WebSeriesSeasonVM.swift | 5 ++- 5 files changed, 43 insertions(+), 30 deletions(-) diff --git a/WOKA/Karaoke/Controller/KaraokeDetailsVC.swift b/WOKA/Karaoke/Controller/KaraokeDetailsVC.swift index 29018ae..d66a344 100644 --- a/WOKA/Karaoke/Controller/KaraokeDetailsVC.swift +++ b/WOKA/Karaoke/Controller/KaraokeDetailsVC.swift @@ -157,7 +157,7 @@ class KaraokeDetailsVC: UIViewController { print("share") } } - + @IBAction func playNowBtnTapped(_ sender: LocalisedElementsButton) { // let sb = UIStoryboard(name: K.StoryBoard.Karaoke, bundle: nil) @@ -207,7 +207,7 @@ class KaraokeDetailsVC: UIViewController { .build() vc.config = config - // vc.dismissTapped = self.tapped + // vc.dismissTapped = self.tapped vc.modalPresentationStyle = .overFullScreen vc.modalTransitionStyle = .crossDissolve vc.documentAudioUrl = url diff --git a/WOKA/Karaoke/Controller/KaraokeListingVC.swift b/WOKA/Karaoke/Controller/KaraokeListingVC.swift index a0f377d..1c98cb9 100644 --- a/WOKA/Karaoke/Controller/KaraokeListingVC.swift +++ b/WOKA/Karaoke/Controller/KaraokeListingVC.swift @@ -63,7 +63,7 @@ class KaraokeListingVC: UIViewController { loadMoreBtn.isHidden = true vm.pageNo += 1 loadMoreActivityIndicator.startAnimating() - vm.getKaraokeListing() + vm.getKaraokeListing(isBtnClick: true) } } @@ -93,7 +93,7 @@ extension KaraokeListingVC : CollectionViewSRC{ /* Updated the top header data */ - vm.indexToLoad = vm.karaokeListData.firstIndex(where: {$0.id == data.id}) ?? 0 + vm.headerData = data vm.setHeaderData() let sb = UIStoryboard(name: K.StoryBoard.Karaoke, bundle: nil) @@ -159,14 +159,14 @@ extension KaraokeListingVC : TableViewSRC{ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let data = vm.karaokeListData[indexPath.row] + /* Updated the top header data */ - vm.indexToLoad = indexPath.row + vm.headerData = data vm.setHeaderData() - let data = vm.karaokeListData[indexPath.row] - let sb = UIStoryboard(name: K.StoryBoard.Karaoke, bundle: nil) let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Karaoke.karaokeDetailsVC) as! KaraokeDetailsVC vcPush.modalPresentationStyle = .overCurrentContext diff --git a/WOKA/Karaoke/Karaoke.storyboard b/WOKA/Karaoke/Karaoke.storyboard index 4d0dc0a..cf27a55 100644 --- a/WOKA/Karaoke/Karaoke.storyboard +++ b/WOKA/Karaoke/Karaoke.storyboard @@ -581,17 +581,17 @@ - + - + - + - + - + - + @@ -707,16 +707,16 @@ - +