- My list Audio books on add remove fav, only calling audiobooks api and reloading in background

- My list Games on add remove fav, only calling Games api and reloading in background
- My list Karaoke on add remove fav, only calling Karaoke api and reloading in background
-Finalised clicks count for every module
This commit is contained in:
2024-08-12 19:58:58 +05:30
parent 3eccad3149
commit d17fe416ae
69 changed files with 708 additions and 137 deletions

View File

@@ -12,6 +12,7 @@
5202AB012BDFA7900043B7BD /* EmailValidation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5202AB002BDFA7900043B7BD /* EmailValidation.swift */; }; 5202AB012BDFA7900043B7BD /* EmailValidation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5202AB002BDFA7900043B7BD /* EmailValidation.swift */; };
520346962C64E29A00D0BD20 /* MyListViewAllCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 520346952C64E29A00D0BD20 /* MyListViewAllCell.xib */; }; 520346962C64E29A00D0BD20 /* MyListViewAllCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 520346952C64E29A00D0BD20 /* MyListViewAllCell.xib */; };
520346972C64E29A00D0BD20 /* MyListViewAllCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520346942C64E29A00D0BD20 /* MyListViewAllCell.swift */; }; 520346972C64E29A00D0BD20 /* MyListViewAllCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520346942C64E29A00D0BD20 /* MyListViewAllCell.swift */; };
5210438E2C69E18F0005A4D1 /* WOKA.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 5210438C2C69E18F0005A4D1 /* WOKA.xcdatamodeld */; };
5219C2C22C086D9C00A1DF4D /* DataTypeConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5219C2C12C086D9B00A1DF4D /* DataTypeConversion.swift */; }; 5219C2C22C086D9C00A1DF4D /* DataTypeConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5219C2C12C086D9B00A1DF4D /* DataTypeConversion.swift */; };
521CB1002C493DB80085BDF8 /* JWPlayerKit in Frameworks */ = {isa = PBXBuildFile; productRef = 521CB0FF2C493DB80085BDF8 /* JWPlayerKit */; }; 521CB1002C493DB80085BDF8 /* JWPlayerKit in Frameworks */ = {isa = PBXBuildFile; productRef = 521CB0FF2C493DB80085BDF8 /* JWPlayerKit */; };
522242662BFC74380085C632 /* MyListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522242632BFC74380085C632 /* MyListVC.swift */; }; 522242662BFC74380085C632 /* MyListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522242632BFC74380085C632 /* MyListVC.swift */; };
@@ -307,7 +308,6 @@
9C85A9F32C5CE1060031C365 /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = 9C85A9F22C5CE1060031C365 /* FirebasePerformance */; }; 9C85A9F32C5CE1060031C365 /* FirebasePerformance in Frameworks */ = {isa = PBXBuildFile; productRef = 9C85A9F22C5CE1060031C365 /* FirebasePerformance */; };
9C8C4FAE2C1315410017DD3B /* WebViewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C8C4FAD2C1315410017DD3B /* WebViewVC.swift */; }; 9C8C4FAE2C1315410017DD3B /* WebViewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C8C4FAD2C1315410017DD3B /* WebViewVC.swift */; };
9C8C4FB02C1328060017DD3B /* Disclaimer.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */; }; 9C8C4FB02C1328060017DD3B /* Disclaimer.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */; };
9C9BE46C2C65DF2A00C48D6A /* WOKA.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BE46A2C65DF2A00C48D6A /* WOKA.xcdatamodeld */; };
9C9BE46E2C663B1600C48D6A /* JWKaraokePlayerVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BE46D2C663B1600C48D6A /* JWKaraokePlayerVM.swift */; }; 9C9BE46E2C663B1600C48D6A /* JWKaraokePlayerVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BE46D2C663B1600C48D6A /* JWKaraokePlayerVM.swift */; };
9C9BEEC72BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */; }; 9C9BEEC72BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */; };
9CA7C6C02C1093E500D73742 /* ProfileVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */; }; 9CA7C6C02C1093E500D73742 /* ProfileVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */; };
@@ -372,6 +372,7 @@
520346952C64E29A00D0BD20 /* MyListViewAllCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyListViewAllCell.xib; sourceTree = "<group>"; }; 520346952C64E29A00D0BD20 /* MyListViewAllCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyListViewAllCell.xib; sourceTree = "<group>"; };
520B6E3E2C0751E90091C478 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Theme.strings; sourceTree = "<group>"; }; 520B6E3E2C0751E90091C478 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Theme.strings; sourceTree = "<group>"; };
520B6E402C0751EF0091C478 /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Theme.strings; sourceTree = "<group>"; }; 520B6E402C0751EF0091C478 /* hi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hi; path = hi.lproj/Theme.strings; sourceTree = "<group>"; };
5210438D2C69E18F0005A4D1 /* WOKA.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = WOKA.xcdatamodel; sourceTree = "<group>"; };
5219C2C12C086D9B00A1DF4D /* DataTypeConversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTypeConversion.swift; sourceTree = "<group>"; }; 5219C2C12C086D9B00A1DF4D /* DataTypeConversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTypeConversion.swift; sourceTree = "<group>"; };
522242632BFC74380085C632 /* MyListVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyListVC.swift; sourceTree = "<group>"; }; 522242632BFC74380085C632 /* MyListVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyListVC.swift; sourceTree = "<group>"; };
522242652BFC74380085C632 /* TabBarVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarVC.swift; sourceTree = "<group>"; }; 522242652BFC74380085C632 /* TabBarVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarVC.swift; sourceTree = "<group>"; };
@@ -662,7 +663,6 @@
9C85A9EB2C5CD5CD0031C365 /* MyListDataTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyListDataTemp.swift; sourceTree = "<group>"; }; 9C85A9EB2C5CD5CD0031C365 /* MyListDataTemp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyListDataTemp.swift; sourceTree = "<group>"; };
9C8C4FAD2C1315410017DD3B /* WebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewVC.swift; sourceTree = "<group>"; }; 9C8C4FAD2C1315410017DD3B /* WebViewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewVC.swift; sourceTree = "<group>"; };
9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Disclaimer.rtf; sourceTree = "<group>"; }; 9C8C4FAF2C1328060017DD3B /* Disclaimer.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Disclaimer.rtf; sourceTree = "<group>"; };
9C9BE46B2C65DF2A00C48D6A /* WOKA.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = WOKA.xcdatamodel; sourceTree = "<group>"; };
9C9BE46D2C663B1600C48D6A /* JWKaraokePlayerVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWKaraokePlayerVM.swift; sourceTree = "<group>"; }; 9C9BE46D2C663B1600C48D6A /* JWKaraokePlayerVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWKaraokePlayerVM.swift; sourceTree = "<group>"; };
9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewCenteredFlowLayout.swift; sourceTree = "<group>"; }; 9C9BEEC62BEE1BBF004ECC2F /* CollectionViewCenteredFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewCenteredFlowLayout.swift; sourceTree = "<group>"; };
9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileVC.swift; sourceTree = "<group>"; }; 9CA7C6BF2C1093E500D73742 /* ProfileVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileVC.swift; sourceTree = "<group>"; };
@@ -888,7 +888,7 @@
9C535DC82C00C34000DA6DCD /* Theme */, 9C535DC82C00C34000DA6DCD /* Theme */,
52DAC6462C21761700E2F85B /* WebSeries */, 52DAC6462C21761700E2F85B /* WebSeries */,
9C834ED92C1C20EC00B29A9C /* WOKA.entitlements */, 9C834ED92C1C20EC00B29A9C /* WOKA.entitlements */,
9C9BE46A2C65DF2A00C48D6A /* WOKA.xcdatamodeld */, 5210438C2C69E18F0005A4D1 /* WOKA.xcdatamodeld */,
52ACC1292C610EC900791528 /* PersistentStorage.swift */, 52ACC1292C610EC900791528 /* PersistentStorage.swift */,
); );
path = WOKA; path = WOKA;
@@ -2226,6 +2226,7 @@
52A6DCA02C4E3AA600F63C51 /* ShopListingCell.swift in Sources */, 52A6DCA02C4E3AA600F63C51 /* ShopListingCell.swift in Sources */,
525954192BE8CC3400191286 /* ConstantString.swift in Sources */, 525954192BE8CC3400191286 /* ConstantString.swift in Sources */,
52D774EB2BDFC0BF001D87DE /* OTPVC.swift in Sources */, 52D774EB2BDFC0BF001D87DE /* OTPVC.swift in Sources */,
5210438E2C69E18F0005A4D1 /* WOKA.xcdatamodeld in Sources */,
9C8446872C40FC6E003E3E53 /* AVPlayerTesting.swift in Sources */, 9C8446872C40FC6E003E3E53 /* AVPlayerTesting.swift in Sources */,
52AF71F42C36C40B00BC5972 /* GamesWebViewVC.swift in Sources */, 52AF71F42C36C40B00BC5972 /* GamesWebViewVC.swift in Sources */,
9C007F202C255DF200F798C2 /* EpisodeListingDM.swift in Sources */, 9C007F202C255DF200F798C2 /* EpisodeListingDM.swift in Sources */,
@@ -2379,7 +2380,6 @@
52C8B05F2BDA5AFA003B51D0 /* SplashVM.swift in Sources */, 52C8B05F2BDA5AFA003B51D0 /* SplashVM.swift in Sources */,
52C1A4E12C05B69F007BAA50 /* UIApplicationSwitchRoot.swift in Sources */, 52C1A4E12C05B69F007BAA50 /* UIApplicationSwitchRoot.swift in Sources */,
527A2BCC2C577F8A0080DF9B /* AnalyticsEventKeys.swift in Sources */, 527A2BCC2C577F8A0080DF9B /* AnalyticsEventKeys.swift in Sources */,
9C9BE46C2C65DF2A00C48D6A /* WOKA.xcdatamodeld in Sources */,
52663FF72BDFACF60001D8CE /* ShadowView.swift in Sources */, 52663FF72BDFACF60001D8CE /* ShadowView.swift in Sources */,
522D65602C1ACD8D0021E505 /* UserNotificationVC.swift in Sources */, 522D65602C1ACD8D0021E505 /* UserNotificationVC.swift in Sources */,
52AC2D252C295A7900337473 /* TeaserDM.swift in Sources */, 52AC2D252C295A7900337473 /* TeaserDM.swift in Sources */,
@@ -2879,14 +2879,14 @@
/* End XCSwiftPackageProductDependency section */ /* End XCSwiftPackageProductDependency section */
/* Begin XCVersionGroup section */ /* Begin XCVersionGroup section */
9C9BE46A2C65DF2A00C48D6A /* WOKA.xcdatamodeld */ = { 5210438C2C69E18F0005A4D1 /* WOKA.xcdatamodeld */ = {
isa = XCVersionGroup; isa = XCVersionGroup;
children = ( children = (
9C9BE46B2C65DF2A00C48D6A /* WOKA.xcdatamodel */, 5210438D2C69E18F0005A4D1 /* WOKA.xcdatamodel */,
); );
currentVersion = 9C9BE46B2C65DF2A00C48D6A /* WOKA.xcdatamodel */; currentVersion = 5210438D2C69E18F0005A4D1 /* WOKA.xcdatamodel */;
name = WOKA.xcdatamodeld; name = WOKA.xcdatamodeld;
path = /Users/bilal/Desktop/woka_native_ios_swift/WOKA/WOKA.xcdatamodeld; path = /Users/macbookpro/Desktop/WOKA/WOKA/WOKA.xcdatamodeld;
sourceTree = "<group>"; sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel; versionGroupType = wrapper.xcdatamodel;
}; };

View File

@@ -38,6 +38,10 @@ class AddNewAddressVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -47,7 +51,8 @@ class AddNewAddressVC: UIViewController {
self.navigationController?.setColor(color: .black) self.navigationController?.setColor(color: .black)
} }
@IBAction func submitBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func submitBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addShopCount(postID: 0)
if enterAddressNAmeTF.text!.count < 2 { if enterAddressNAmeTF.text!.count < 2 {
Utilities.alertWithBtn(title: "", msgBody: "Name should be minimum 2 Characters.", okBtnStr: "OK", vc: self) Utilities.alertWithBtn(title: "", msgBody: "Name should be minimum 2 Characters.", okBtnStr: "OK", vc: self)
return return

View File

@@ -36,7 +36,6 @@ class AddressListVC: UIViewController {
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
self.navigationController?.setColor(color: .white) self.navigationController?.setColor(color: .white)
// handle data change // handle data change
self.tableView.reloadData() self.tableView.reloadData()
} }
@@ -44,6 +43,10 @@ class AddressListVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -54,6 +57,8 @@ class AddressListVC: UIViewController {
} }
@IBAction func btnTapped(_ sender: LocalisedElementsButton) { @IBAction func btnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addShopCount(postID: 0)
switch sender{ switch sender{
case useSelectedAddBtn: case useSelectedAddBtn:
if let addressID = CartDataCache.addressData.filter({$0.isDefault == true}).first?.id{ if let addressID = CartDataCache.addressData.filter({$0.isDefault == true}).first?.id{
@@ -89,6 +94,8 @@ extension AddressListVC : TableViewSRC{
CartDataCache.addressData[index].isDefault = false CartDataCache.addressData[index].isDefault = false
} }
PersistentStorage.shared.addShopCount(postID: 0)
// //
if CartDataCache.addressData[indexPath.row].eddDate == nil || CartDataCache.addressData[indexPath.row].eddDate == ""{ if CartDataCache.addressData[indexPath.row].eddDate == nil || CartDataCache.addressData[indexPath.row].eddDate == ""{
if let pincode = CartDataCache.addressData[indexPath.row].pincode, let id = CartDataCache.addressData[indexPath.row].id{ if let pincode = CartDataCache.addressData[indexPath.row].pincode, let id = CartDataCache.addressData[indexPath.row].id{

View File

@@ -29,6 +29,16 @@ class PaymentWebViewVC: UIViewController,WKNavigationDelegate {
webView.addObserver(self, forKeyPath: "URL", options: .new, context: nil) webView.addObserver(self, forKeyPath: "URL", options: .new, context: nil)
} }
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated)
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
Utilities.dismissProgressHUD() Utilities.dismissProgressHUD()
@@ -46,9 +56,15 @@ class PaymentWebViewVC: UIViewController,WKNavigationDelegate {
domain = finalURL.host ?? "" domain = finalURL.host ?? ""
} }
if domain == "secure.ccavenue.com" && endpoint.lowercased() == "canceltransaction"{ if domain == "secure.ccavenue.com" && endpoint.lowercased() == "canceltransaction"{ // failure
Timer.scheduledTimer(withTimeInterval: 2.5, repeats: false) { _ in Timer.scheduledTimer(withTimeInterval: 2.5, repeats: false) { _ in
self.dismiss(animated: true) self.navigationController?.popViewController(animated: true)
}
}else if domain == "secure.ccavenue.com" && endpoint.lowercased() == "redirectToMerchant"{ // success
// nav to home. & delete my cart
CartDataCache.shareInstance.removeAll()
Timer.scheduledTimer(withTimeInterval: 2.5, repeats: false) { _ in
self.navigationController?.popToRootViewController(animated: true)
} }
} }
} else { } else {
@@ -57,25 +73,5 @@ class PaymentWebViewVC: UIViewController,WKNavigationDelegate {
} }
} }
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: animated)
}
override func viewDidAppear(_ animated: Bool) {
self.navigationController?.setColor(color: .white)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated)
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
// Customize the navigation bar's appearance
self.navigationController?.setColor(color: .black)
}
} }

View File

@@ -36,6 +36,10 @@ class VerifyAddressPincodeVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -46,6 +50,7 @@ class VerifyAddressPincodeVC: UIViewController {
} }
@IBAction func proceedBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func proceedBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addShopCount(postID: 0)
guard let tf = pinCodeTF.text else{return} guard let tf = pinCodeTF.text else{return}
if sender.titleLabel?.text == "CHECK NOW"{ if sender.titleLabel?.text == "CHECK NOW"{
if tf.count < 6{ if tf.count < 6{

View File

@@ -171,7 +171,7 @@ class AddressListVM{
vcPush.url = data.url vcPush.url = data.url
vcPush.modalTransitionStyle = .crossDissolve vcPush.modalTransitionStyle = .crossDissolve
vcPush.modalPresentationStyle = .fullScreen vcPush.modalPresentationStyle = .fullScreen
self.vc.present(vcPush, animated: true) self.vc.navigationController?.pushViewController(vcPush, animated: true)
default: default:
Utilities.dismissProgressHUD() Utilities.dismissProgressHUD()
break break

View File

@@ -47,6 +47,9 @@ class AudioBookDetailsVC : UIViewController{
@objc func handleTap(_ gesture: UITapGestureRecognizer) { @objc func handleTap(_ gesture: UITapGestureRecognizer) {
let location = gesture.location(in: outerView) let location = gesture.location(in: outerView)
if !contentView.frame.contains(location) { if !contentView.frame.contains(location) {
if let postID = audioData?.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
self.dismiss(animated: true) self.dismiss(animated: true)
} }
} }
@@ -57,6 +60,9 @@ class AudioBookDetailsVC : UIViewController{
addView.addTapGesture { [weak self] in addView.addTapGesture { [weak self] in
guard let self else{return} guard let self else{return}
if let postID = audioData?.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
if let audioData{ if let audioData{
@@ -66,10 +72,12 @@ class AudioBookDetailsVC : UIViewController{
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.audioData?.markAsFavourite = false self.audioData?.markAsFavourite = false
if let index = MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == showID}){ // if let index = MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == showID}){
MyListDataTemp.shareInstance.favListingData?.audioData?.remove(at: index) // MyListDataTemp.shareInstance.favListingData?.audioData?.remove(at: index)
K.GVar.myListSoftReload = true // K.GVar.myListSoftReload = true
} // }
K.GVar.reloadMyListAudioBooks = true
self.delegate?.updateRows(index: self.audioIndex, type: .favourite, isFav: false, isLike: nil, id: showID) self.delegate?.updateRows(index: self.audioIndex, type: .favourite, isFav: false, isLike: nil, id: showID)
self.initView() self.initView()
@@ -78,10 +86,12 @@ class AudioBookDetailsVC : UIViewController{
LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.audioData?.markAsFavourite = true self.audioData?.markAsFavourite = true
if let audioData = self.audioData{ // if let audioData = self.audioData{
MyListDataTemp.shareInstance.favListingData?.audioData?.append(audioData) // MyListDataTemp.shareInstance.favListingData?.audioData?.append(audioData)
K.GVar.myListSoftReload = true // K.GVar.myListSoftReload = true
} // }
K.GVar.reloadMyListAudioBooks = true
self.delegate?.updateRows(index: self.audioIndex, type: .favourite, isFav: true, isLike: nil, id: showID) self.delegate?.updateRows(index: self.audioIndex, type: .favourite, isFav: true, isLike: nil, id: showID)
self.initView() self.initView()
@@ -121,6 +131,9 @@ class AudioBookDetailsVC : UIViewController{
likeView.addTapGesture { [weak self] in likeView.addTapGesture { [weak self] in
guard let self else{return} guard let self else{return}
if let postID = audioData?.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
if let audioData{ if let audioData{
@@ -196,7 +209,12 @@ class AudioBookDetailsVC : UIViewController{
} }
shareView.addTapGesture { shareView.addTapGesture { [weak self] in
guard let self else{return}
if let postID = audioData?.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
if let name = URL(string: "https://apps.apple.com/in/app/woka/id6465305185"), !name.absoluteString.isEmpty { if let name = URL(string: "https://apps.apple.com/in/app/woka/id6465305185"), !name.absoluteString.isEmpty {
let objectsToShare = [name] let objectsToShare = [name]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
@@ -335,9 +353,9 @@ class AudioBookDetailsVC : UIViewController{
} }
@IBAction func closeBtnTapped(_ sender: UIButton) { @IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true) { if let postID = audioData?.id{
PersistentStorage.shared.addAudioCount(postID: postID)
} }
self.dismiss(animated: true)
} }
} }

View File

@@ -59,6 +59,11 @@ class AudioBookHomeVC: UIViewController {
// Customize the navigation bar's appearance // Customize the navigation bar's appearance
self.navigationController?.setColor(color: .black) self.navigationController?.setColor(color: .black)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidLayoutSubviews() { override func viewDidLayoutSubviews() {
@@ -74,6 +79,9 @@ class AudioBookHomeVC: UIViewController {
@IBAction func listenAudioBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func listenAudioBtnTapped(_ sender: LocalisedElementsButton) {
guard let data = vm.headerData else{return} guard let data = vm.headerData else{return}
if let postID = data.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
var playerItems = [JwPlayerItemCreate]() var playerItems = [JwPlayerItemCreate]()
if AuthFunc.shareInstance.getDefaultLanguage() == .english{ if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = data.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let url = englishData.url{ if let englishData = data.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let url = englishData.url{
@@ -157,7 +165,7 @@ extension AudioBookHomeVC : TableViewSRC{
guard let postID = data.id ,let postType = data.contentMoreDetails?.first?.postType else{return} guard let postID = data.id ,let postType = data.contentMoreDetails?.first?.postType else{return}
let isFav = data.markAsFavourite let isFav = data.markAsFavourite
let isLiked = data.isLiked let isLiked = data.isLiked
PersistentStorage.shared.addAudioCount(postID: postID)
vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType) vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType)
} }
@@ -171,6 +179,11 @@ extension AudioBookHomeVC : TableViewSRC{
Updated the top header data Updated the top header data
*/ */
vm.headerData = data vm.headerData = data
if let postID = data.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
vm.setHeaderData() vm.setHeaderData()
let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil)
@@ -200,7 +213,7 @@ extension AudioBookHomeVC : CollectionViewSRC{
guard let postID = data.id ,let postType = data.contentMoreDetails?.first?.postType else{return} guard let postID = data.id ,let postType = data.contentMoreDetails?.first?.postType else{return}
let isFav = data.markAsFavourite let isFav = data.markAsFavourite
let isLiked = data.isLiked let isLiked = data.isLiked
PersistentStorage.shared.addAudioCount(postID: postID)
vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType) vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType)
} }
return cell return cell
@@ -209,6 +222,10 @@ extension AudioBookHomeVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let data = vm.continueWatchingData[indexPath.row] let data = vm.continueWatchingData[indexPath.row]
vm.headerData = data vm.headerData = data
if let postID = data.id{
PersistentStorage.shared.addAudioCount(postID: postID)
}
vm.setHeaderData() vm.setHeaderData()
let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.audioBooks, bundle: nil)

View File

@@ -195,7 +195,7 @@ class AudioBookHomeVM{
audioListData[showListIndex].markAsFavourite = false audioListData[showListIndex].markAsFavourite = false
vc.audioListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none) vc.audioListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none)
K.GVar.reloadMyList = true K.GVar.reloadMyListAudioBooks = true
// // MyList Update // // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// if let indexRemove = MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == postID}){ // if let indexRemove = MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == postID}){
@@ -211,7 +211,7 @@ class AudioBookHomeVM{
if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){ if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){
continueWatchingData[continueWatchingIndex].markAsFavourite = false continueWatchingData[continueWatchingIndex].markAsFavourite = false
vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)]) vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)])
K.GVar.reloadMyList = true K.GVar.reloadMyListAudioBooks = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// if let indexRemove = MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == postID}){ // if let indexRemove = MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == postID}){
@@ -228,7 +228,7 @@ class AudioBookHomeVM{
if let showListIndex = audioListData.firstIndex(where: { $0.id == postID }){ if let showListIndex = audioListData.firstIndex(where: { $0.id == postID }){
audioListData[showListIndex].markAsFavourite = true audioListData[showListIndex].markAsFavourite = true
vc.audioListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none) vc.audioListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none)
K.GVar.reloadMyList = true K.GVar.reloadMyListAudioBooks = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// let audioData = audioListData[showListIndex] // let audioData = audioListData[showListIndex]
@@ -243,7 +243,7 @@ class AudioBookHomeVM{
if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){ if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){
continueWatchingData[continueWatchingIndex].markAsFavourite = true continueWatchingData[continueWatchingIndex].markAsFavourite = true
vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)]) vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)])
K.GVar.reloadMyList = true K.GVar.reloadMyListAudioBooks = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// if MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == postID}) == nil{ // if MyListDataTemp.shareInstance.favListingData?.audioData?.firstIndex(where: {$0.id == postID}) == nil{

View File

@@ -1113,7 +1113,7 @@ Sent to Your Parents Email</string>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="35" translatesAutoresizingMaskIntoConstraints="NO" id="NPA-IJ-SA5"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="35" translatesAutoresizingMaskIntoConstraints="NO" id="NPA-IJ-SA5">
<rect key="frame" x="30" y="776" width="370" height="102"/> <rect key="frame" x="30" y="776" width="370" height="102"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="We will send a reset code to their email" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uv4-iY-Z87" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="We will send a reset code to email" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uv4-iY-Z87" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="370" height="17"/> <rect key="frame" x="0.0" y="0.0" width="370" height="17"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="14"/> <fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="14"/>
<color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> <color key="textColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>

View File

@@ -35,9 +35,15 @@ class EmailVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
/* /*
If child registers dont call api to check email, directly hit sendotp and navigate to otp screen If child registers dont call api to check email, directly hit sendotp and navigate to otp screen
if parent registers check if the email exist or not and then hit sendotp if parent registers check if the email exist or not and then hit sendotp

View File

@@ -28,9 +28,15 @@ class LinkedChildVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
// if self.isMovingFromParent {
// // Back button was pressed
// PersistentStorage.shared.addOthersCount()
// }
} }
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.userDetailsRegisterVC) as! UserDetailsRegisterVC let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.userDetailsRegisterVC) as! UserDetailsRegisterVC
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)

View File

@@ -30,6 +30,7 @@ class LoginVC: UIViewController {
} }
@IBAction func loginBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func loginBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
guard let userName = userNameTF.text , let pass = passwordTF.text else{return} guard let userName = userNameTF.text , let pass = passwordTF.text else{return}
/* /*
@@ -61,16 +62,19 @@ class LoginVC: UIViewController {
} }
@IBAction func createAccountBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func createAccountBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
let sb = UIStoryboard(name: K.StoryBoard.main, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.main, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.OnBoarding.selectAgeVC) as! SelectAgeVC let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.OnBoarding.selectAgeVC) as! SelectAgeVC
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
@IBAction func continueGuestBtnTapped(_ sender: UIButton) { @IBAction func continueGuestBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
vm.guestLogin() vm.guestLogin()
} }
@IBAction func forgotPasswordBtnTapped(_ sender: UIButton) { @IBAction func forgotPasswordBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.resetPassUserNameVC) as! ResetPassUserNameVC let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.resetPassUserNameVC) as! ResetPassUserNameVC
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)

View File

@@ -31,9 +31,14 @@ class NewPasswordVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
guard let pass = enterNewPasswordTF.text , let confirmPass = confirmPassTF.text else{return} guard let pass = enterNewPasswordTF.text , let confirmPass = confirmPassTF.text else{return}
/* /*

View File

@@ -45,6 +45,11 @@ class OTPVC : UIViewController{
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
deinit { deinit {
@@ -53,10 +58,12 @@ class OTPVC : UIViewController{
// MARK: - Button Tap Handler // MARK: - Button Tap Handler
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
vm.validateOTP() vm.validateOTP()
} }
@IBAction func resendOTPBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func resendOTPBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
vm.remainingTime = 10 * 60 vm.remainingTime = 10 * 60
vm.resendOTP() vm.resendOTP()
} }

View File

@@ -29,10 +29,16 @@ class ResetPassUserNameVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
/* /*
Check for username Check for username
*/ */

View File

@@ -28,9 +28,15 @@ class SelectAvatarVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
// Check for avatar. // Check for avatar.
if AuthFunc.shareInstance.regData.avtar == nil || AuthFunc.shareInstance.regData.avtar == ""{ if AuthFunc.shareInstance.regData.avtar == nil || AuthFunc.shareInstance.regData.avtar == ""{
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
@@ -63,6 +69,7 @@ extension SelectAvatarVC : UICollectionViewDelegate , UICollectionViewDataSource
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
PersistentStorage.shared.addOthersCount()
AuthFunc.shareInstance.regData.avtar = vm.avatarData[indexPath.row].avatarName AuthFunc.shareInstance.regData.avtar = vm.avatarData[indexPath.row].avatarName
collectionView.reloadData() collectionView.reloadData()
} }

View File

@@ -36,11 +36,17 @@ class UserDetailsRegisterVC : UIViewController{
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
// MARK: - Button Tap Handler // MARK: - Button Tap Handler
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
guard let name = enterNameTF.text ,let userName = enterUserNameTF.text , let pass = enterPasswordTF.text else{return} guard let name = enterNameTF.text ,let userName = enterUserNameTF.text , let pass = enterPasswordTF.text else{return}
/* /*

View File

@@ -60,9 +60,15 @@ class UserIntrestVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
@IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func nextBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
let dob = DateFormatterLib.dateModsDate(date: datePicker.date, dateReturnFormat: .yyyy_MM_dd, stringOrDate: .string).0 let dob = DateFormatterLib.dateModsDate(date: datePicker.date, dateReturnFormat: .yyyy_MM_dd, stringOrDate: .string).0
/* /*
Append the DOB to RegData Append the DOB to RegData
@@ -137,7 +143,7 @@ extension UserIntrestVC : UICollectionViewDelegate , UICollectionViewDataSource{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
vm.intrestTopics[indexPath.row].isSelected?.toggle() vm.intrestTopics[indexPath.row].isSelected?.toggle()
PersistentStorage.shared.addOthersCount()
//Append remove intrest ID //Append remove intrest ID
if let id = vm.intrestTopics[indexPath.row].id{ if let id = vm.intrestTopics[indexPath.row].id{
if let topicID = AuthFunc.shareInstance.regData.interest_topic_id, let index = topicID.firstIndex(of: id){ if let topicID = AuthFunc.shareInstance.regData.interest_topic_id, let index = topicID.firstIndex(of: id){

View File

@@ -47,7 +47,7 @@ class NewPasswordVM{
case 1: // Success case 1: // Success
Utilities.dismissProgressHUD() Utilities.dismissProgressHUD()
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 1) { self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 1) {
UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB))
} }
default: default:
Utilities.dismissProgressHUD() Utilities.dismissProgressHUD()

View File

@@ -19,7 +19,7 @@ class ResetPassUserNameVM{
vc.nextBtn.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0)) vc.nextBtn.applyGradient(colors: [color1, color2], startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 0.8, y: 0))
vc.nextBtn.roundCorner() vc.nextBtn.roundCorner()
vc.usernameTF.placeholder = "We will send a reset code to their email".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue) vc.usernameTF.placeholder = "Please enter you username".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
vc.usernameTF.delegate = self.vc vc.usernameTF.delegate = self.vc
//Adding error view to the name tf //Adding error view to the name tf

View File

@@ -99,6 +99,7 @@ class UserIntrestVM{
} }
@objc func boyBtnTapped() { @objc func boyBtnTapped() {
PersistentStorage.shared.addOthersCount()
// Apply click effect animation // Apply click effect animation
AuthFunc.shareInstance.regData.gender = 2 AuthFunc.shareInstance.regData.gender = 2
UIView.animate(withDuration: 0.1, animations: { UIView.animate(withDuration: 0.1, animations: {
@@ -112,6 +113,7 @@ class UserIntrestVM{
} }
@objc func girlBtnTapped() { @objc func girlBtnTapped() {
PersistentStorage.shared.addOthersCount()
AuthFunc.shareInstance.regData.gender = 1 AuthFunc.shareInstance.regData.gender = 1
// Apply click effect animation // Apply click effect animation

View File

@@ -138,23 +138,23 @@
<rect key="frame" x="0.0" y="59" width="414" height="803"/> <rect key="frame" x="0.0" y="59" width="414" height="803"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4FL-Qu-GXb"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4FL-Qu-GXb">
<rect key="frame" x="0.0" y="0.0" width="414" height="363"/> <rect key="frame" x="0.0" y="0.0" width="414" height="364.33333333333331"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order Summary" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fbh-Ve-yLY" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order Summary" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fbh-Ve-yLY" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="5" y="4.9999999999999982" width="404" height="23.333333333333329"/> <rect key="frame" x="5" y="5" width="404" height="24"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="qGY-nv-azT"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="qGY-nv-azT">
<rect key="frame" x="5" y="38.333333333333329" width="404" height="99.999999999999986"/> <rect key="frame" x="5" y="39" width="404" height="100"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="100" id="cQ3-vj-QS5"/> <constraint firstAttribute="height" constant="100" id="cQ3-vj-QS5"/>
</constraints> </constraints>
</tableView> </tableView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ZuF-hT-QwS"> <stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ZuF-hT-QwS">
<rect key="frame" x="5" y="148.33333333333334" width="404" height="50"/> <rect key="frame" x="5" y="149" width="404" height="50"/>
<subviews> <subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter coupon code" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0cZ-tT-3PH" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter coupon code" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0cZ-tT-3PH" customClass="TextFieldShadow" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="5" y="0.0" width="294" height="50"/> <rect key="frame" x="5" y="0.0" width="294" height="50"/>
@@ -209,14 +209,14 @@
<edgeInsets key="layoutMargins" top="0.0" left="5" bottom="0.0" right="5"/> <edgeInsets key="layoutMargins" top="0.0" left="5" bottom="0.0" right="5"/>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0M5-Sk-NNP"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0M5-Sk-NNP">
<rect key="frame" x="5" y="208.33333333333331" width="404" height="0.66666666666665719"/> <rect key="frame" x="5" y="209" width="404" height="0.66666666666665719"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="0.69999999999999996" id="euT-bu-DWE"/> <constraint firstAttribute="height" constant="0.69999999999999996" id="euT-bu-DWE"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hjo-i3-vzd"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hjo-i3-vzd">
<rect key="frame" x="5" y="219" width="404" height="34.333333333333343"/> <rect key="frame" x="5" y="219.66666666666669" width="404" height="34.333333333333343"/>
<color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="All Offers &amp; Coupons" image="chevron.forward.circle.fill" catalog="system"/> <state key="normal" title="All Offers &amp; Coupons" image="chevron.forward.circle.fill" catalog="system"/>
@@ -226,39 +226,39 @@
</connections> </connections>
</button> </button>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" No Coupon Found!" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yYe-w7-xHF" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" No Coupon Found!" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yYe-w7-xHF" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="5" y="258.33333333333331" width="404" height="0.0"/> <rect key="frame" x="5" y="259" width="404" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kB1-D9-Jpc"> <tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kB1-D9-Jpc">
<rect key="frame" x="5" y="258.33333333333331" width="404" height="0.0"/> <rect key="frame" x="5" y="259" width="404" height="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" id="Uhk-ez-kna"/> <constraint firstAttribute="height" id="Uhk-ez-kna"/>
</constraints> </constraints>
</tableView> </tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PfV-Yj-8cg"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PfV-Yj-8cg">
<rect key="frame" x="5" y="263.33333333333331" width="404" height="0.66666666666668561"/> <rect key="frame" x="5" y="264" width="404" height="0.66666666666668561"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="0.69999999999999996" id="4xH-CV-oza"/> <constraint firstAttribute="height" constant="0.69999999999999996" id="4xH-CV-oza"/>
</constraints> </constraints>
</view> </view>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="IIC-eN-1kV"> <stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="IIC-eN-1kV">
<rect key="frame" x="5" y="269" width="404" height="40.666666666666686"/> <rect key="frame" x="5" y="269.66666666666669" width="404" height="40.666666666666686"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="0fF-q8-366"> <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="0fF-q8-366">
<rect key="frame" x="0.0" y="0.0" width="404" height="0.0"/> <rect key="frame" x="0.0" y="0.0" width="404" height="0.0"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtotal: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X02-Xy-T6S" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subtotal: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X02-Xy-T6S" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="78" height="0.0"/> <rect key="frame" x="0.0" y="0.0" width="82" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VJO-dL-zw7" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VJO-dL-zw7" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="362.33333333333331" y="0.0" width="41.666666666666686" height="0.0"/> <rect key="frame" x="363" y="0.0" width="41" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@@ -269,13 +269,13 @@
<rect key="frame" x="0.0" y="20" width="404" height="0.0"/> <rect key="frame" x="0.0" y="20" width="404" height="0.0"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Discount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SjJ-9G-tNV" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Discount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SjJ-9G-tNV" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="81.666666666666671" height="0.0"/> <rect key="frame" x="0.0" y="0.0" width="84" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aru-WM-a5c" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aru-WM-a5c" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="362.33333333333331" y="0.0" width="41.666666666666686" height="0.0"/> <rect key="frame" x="363" y="0.0" width="41" height="0.0"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@@ -292,19 +292,19 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="qF1-U6-f3P"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="qF1-U6-f3P">
<rect key="frame" x="5" y="274" width="404" height="84"/> <rect key="frame" x="5" y="274.66666666666669" width="404" height="84.666666666666686"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="YSF-eO-Ree"> <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="YSF-eO-Ree">
<rect key="frame" x="0.0" y="0.0" width="404" height="21"/> <rect key="frame" x="0.0" y="0.0" width="404" height="21.666666666666668"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total Amount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDO-yI-336" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Total Amount: " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDO-yI-336" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="116.33333333333333" height="21"/> <rect key="frame" x="0.0" y="0.0" width="122" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lH2-35-Ttu" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rs. 0" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lH2-35-Ttu" customClass="LocalisedElementsLabel" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="362.33333333333331" y="0.0" width="41.666666666666686" height="21"/> <rect key="frame" x="363" y="0.0" width="41" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/> <fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@@ -312,7 +312,7 @@
</subviews> </subviews>
</stackView> </stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rp4-qX-3OH" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rp4-qX-3OH" customClass="LocalisedElementsButton" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="34" width="404" height="50"/> <rect key="frame" x="0.0" y="34.666666666666629" width="404" height="50"/>
<color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.035294117649999998" green="0.0" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="UFU-ci-N8q"> <constraint firstAttribute="height" constant="50" id="UFU-ci-N8q">
@@ -388,7 +388,7 @@
</scenes> </scenes>
<designables> <designables>
<designable name="0cZ-tT-3PH"> <designable name="0cZ-tT-3PH">
<size key="intrinsicContentSize" width="186.66666666666666" height="20.333333333333332"/> <size key="intrinsicContentSize" width="184.33333333333334" height="21"/>
</designable> </designable>
</designables> </designables>
<resources> <resources>
@@ -398,7 +398,7 @@
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<systemColor name="systemGreenColor"> <systemColor name="systemGreenColor">
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor> </systemColor>
</resources> </resources>
</document> </document>

View File

@@ -34,6 +34,13 @@ class CartDataCache{
static let cartBadgeLabel = UILabel() static let cartBadgeLabel = UILabel()
static let shareInstance = CartDataCache() static let shareInstance = CartDataCache()
func removeAll(){
CartDataCache.addressData.removeAll()
CartDataCache.cartListData.removeAll()
CartDataCache.isFetched = false
CartDataCache.cartBadgeLabel.text = "0"
}
func getCartList(vc : UIViewController, onCompletion : @escaping (Bool) -> Void){ func getCartList(vc : UIViewController, onCompletion : @escaping (Bool) -> Void){
let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()] let headers : HTTPHeaders = ["access-token" : AuthFunc.shareInstance.getAccessToken()]

View File

@@ -39,6 +39,10 @@ class CartListVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -51,6 +55,8 @@ class CartListVC: UIViewController {
// MARK: - Tap Handler // MARK: - Tap Handler
@IBAction func checkoutBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func checkoutBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addShopCount(postID: 0)
if AuthFunc.shareInstance.getUserType() == 1{ // Kids cannot purchase goods if AuthFunc.shareInstance.getUserType() == 1{ // Kids cannot purchase goods
// Utilities.alertWithBtn(title: "", msgBody: "Children cannot purchase this product. Please contact your Guardian.", okBtnStr: "OK", vc: self) // Utilities.alertWithBtn(title: "", msgBody: "Children cannot purchase this product. Please contact your Guardian.", okBtnStr: "OK", vc: self)
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
@@ -108,6 +114,9 @@ extension CartListVC : TableViewSRC{
} }
private func handleMoveToTrash(indexPath : Int) { private func handleMoveToTrash(indexPath : Int) {
if let postID = CartDataCache.cartListData[indexPath].id{
PersistentStorage.shared.addShopCount(postID: postID)
}
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC
vcPush.mainTitleText = "Alert!" vcPush.mainTitleText = "Alert!"
@@ -118,11 +127,16 @@ extension CartListVC : TableViewSRC{
switch mode{ switch mode{
case .yes: case .yes:
guard let self else{return} guard let self else{return}
if let postID = CartDataCache.cartListData[indexPath].id{
PersistentStorage.shared.addShopCount(postID: postID)
}
if let shopMasterID = CartDataCache.cartListData[indexPath].id{ if let shopMasterID = CartDataCache.cartListData[indexPath].id{
vm.removeItemFromCart(shopMasterID: shopMasterID, index: indexPath) vm.removeItemFromCart(shopMasterID: shopMasterID, index: indexPath)
} }
case .no: case .no:
print("no") if let postID = CartDataCache.cartListData[indexPath].id{
PersistentStorage.shared.addShopCount(postID: postID)
}
} }
} }
vcPush.modalPresentationStyle = .overCurrentContext vcPush.modalPresentationStyle = .overCurrentContext

View File

@@ -48,6 +48,10 @@ class CartPaymentOptionsVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -59,7 +63,7 @@ class CartPaymentOptionsVC: UIViewController {
@IBAction func offerCouponBtnTapped(_ sender: UIButton) { @IBAction func offerCouponBtnTapped(_ sender: UIButton) {
vm.isExpanded.toggle() vm.isExpanded.toggle()
PersistentStorage.shared.addShopCount(postID: 0)
if vm.isExpanded{ if vm.isExpanded{
sender.setImage(UIImage(systemName: "chevron.down.circle.fill"), for: .normal) sender.setImage(UIImage(systemName: "chevron.down.circle.fill"), for: .normal)
self.couponTableView.isHidden = false self.couponTableView.isHidden = false
@@ -70,6 +74,7 @@ class CartPaymentOptionsVC: UIViewController {
} }
@IBAction func confirmBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func confirmBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addShopCount(postID: 0)
let sb = UIStoryboard(name: K.StoryBoard.address, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.address, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Address.addressListVC) as! AddressListVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Address.addressListVC) as! AddressListVC
vcPush.vm.couponCodeApplied = vm.couponCodeApplied vcPush.vm.couponCodeApplied = vm.couponCodeApplied
@@ -78,6 +83,7 @@ class CartPaymentOptionsVC: UIViewController {
} }
@IBAction func applyBtnTapped(_ sender: UIButton) { @IBAction func applyBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addShopCount(postID: 0)
if self.couponCodeTF.text == "" { if self.couponCodeTF.text == "" {
Utilities.alertWithBtn(title: "", msgBody: "Please enter coupon code", okBtnStr: "OK", vc: self) Utilities.alertWithBtn(title: "", msgBody: "Please enter coupon code", okBtnStr: "OK", vc: self)
return return
@@ -120,6 +126,7 @@ extension CartPaymentOptionsVC : TableViewSRC{
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if tableView == couponTableView{ if tableView == couponTableView{
PersistentStorage.shared.addShopCount(postID: 0)
let couponCode = vm.couponData[indexPath.row].couponCode let couponCode = vm.couponData[indexPath.row].couponCode
vm.couponCodeSelected = vm.couponData[indexPath.row].couponCode ?? "" vm.couponCodeSelected = vm.couponData[indexPath.row].couponCode ?? ""
self.couponCodeTF.text = couponCode self.couponCodeTF.text = couponCode

View File

@@ -15,5 +15,9 @@ extension K{
static var topView = TopViewEnum.theme1 static var topView = TopViewEnum.theme1
static var myListSoftReload = false static var myListSoftReload = false
static var reloadMyListAudioBooks = false
static var reloadKaraoke = false
static var reloadGames = false
} }
} }

View File

@@ -8,6 +8,7 @@
import UIKit import UIKit
import Lottie import Lottie
import Alamofire import Alamofire
import FirebaseAnalytics
class OnBoardVM{ class OnBoardVM{
@@ -133,6 +134,11 @@ class OnBoardVM{
Utilities.dismissProgressHUD() Utilities.dismissProgressHUD()
guard let dataUser = data.data else{return} guard let dataUser = data.data else{return}
if let newGuest = dataUser.newGuest, newGuest == true{
//Fire Analytics
Analytics.logEvent(K.AnalyticsEventKeys.guest_login_iOS, parameters: nil)
}
self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2) { self.vc.toast(msg: data.message ?? "Unrecognised error" , time: 2) {
let userDataConverted = UserDataDM.ResultData(id: nil, username: dataUser.username, fullname: dataUser.fullname, birthdate: nil, email: nil, avtar: nil, avtarURL: nil, userType: "3", languageMasterID: nil, lastLogin: nil, rememberToken: nil, childDetail: nil, language: nil, alreadyLoggedIn: nil, isDeactive: nil) let userDataConverted = UserDataDM.ResultData(id: nil, username: dataUser.username, fullname: dataUser.fullname, birthdate: nil, email: nil, avtar: nil, avtarURL: nil, userType: "3", languageMasterID: nil, lastLogin: nil, rememberToken: nil, childDetail: nil, language: nil, alreadyLoggedIn: nil, isDeactive: nil)
AuthFunc.shareInstance.loginDefaults(data: userDataConverted) AuthFunc.shareInstance.loginDefaults(data: userDataConverted)

View File

@@ -40,6 +40,9 @@ class GamesDetailVC: UIViewController {
@objc func handleTap(_ gesture: UITapGestureRecognizer) { @objc func handleTap(_ gesture: UITapGestureRecognizer) {
let location = gesture.location(in: outerView) let location = gesture.location(in: outerView)
if !contentView.frame.contains(location) { if !contentView.frame.contains(location) {
if let postID = gameData?.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
self.dismiss(animated: true) self.dismiss(animated: true)
} }
} }
@@ -105,6 +108,9 @@ class GamesDetailVC: UIViewController {
addView.addTapGesture { [weak self] in addView.addTapGesture { [weak self] in
guard let self else{return} guard let self else{return}
if let postID = gameData?.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
if let gameData{ if let gameData{
@@ -114,10 +120,11 @@ class GamesDetailVC: UIViewController {
//remove //remove
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.gameData?.markAsFavourite = false self.gameData?.markAsFavourite = false
if let index = MyListDataTemp.shareInstance.favListingData?.gameData?.firstIndex(where: {$0.id == showID}){ // if let index = MyListDataTemp.shareInstance.favListingData?.gameData?.firstIndex(where: {$0.id == showID}){
MyListDataTemp.shareInstance.favListingData?.gameData?.remove(at: index) // MyListDataTemp.shareInstance.favListingData?.gameData?.remove(at: index)
K.GVar.myListSoftReload = true // K.GVar.myListSoftReload = true
} // }
K.GVar.reloadGames = true
self.delegate?.updateRows(index: self.gameIndex, type: .favourite, isFav: false, isLike: nil, id: showID) self.delegate?.updateRows(index: self.gameIndex, type: .favourite, isFav: false, isLike: nil, id: showID)
self.initView() self.initView()
} }
@@ -125,10 +132,12 @@ class GamesDetailVC: UIViewController {
//add //add
LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.gameData?.markAsFavourite = true self.gameData?.markAsFavourite = true
if let gameData = self.gameData{ // if let gameData = self.gameData{
MyListDataTemp.shareInstance.favListingData?.gameData?.append(gameData) // MyListDataTemp.shareInstance.favListingData?.gameData?.append(gameData)
} // K.GVar.myListSoftReload = true
K.GVar.myListSoftReload = true // }
K.GVar.reloadGames = true
self.delegate?.updateRows(index: self.gameIndex, type: .favourite, isFav: true, isLike: nil, id: showID) self.delegate?.updateRows(index: self.gameIndex, type: .favourite, isFav: true, isLike: nil, id: showID)
self.initView() self.initView()
} }
@@ -139,6 +148,9 @@ class GamesDetailVC: UIViewController {
likeView.addTapGesture { [weak self] in likeView.addTapGesture { [weak self] in
guard let self else{return} guard let self else{return}
if let postID = gameData?.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
if let gameData{ if let gameData{
@@ -184,10 +196,14 @@ class GamesDetailVC: UIViewController {
} }
@IBAction func playNowBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func playNowBtnTapped(_ sender: LocalisedElementsButton) {
if let postID = gameData?.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesWebViewVC) as! GamesWebViewVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesWebViewVC) as! GamesWebViewVC
//https://wokastaging.in/wokagames/Games/html/WokaLudo/index.php
vcPush.url = self.gameData?.gameURL vcPush.url = self.gameData?.gameURL
vcPush.postID = gameData?.id
vcPush.orientation = self.gameData?.screenOrientation vcPush.orientation = self.gameData?.screenOrientation
vcPush.modalTransitionStyle = .crossDissolve vcPush.modalTransitionStyle = .crossDissolve
vcPush.modalPresentationStyle = .fullScreen vcPush.modalPresentationStyle = .fullScreen
@@ -195,8 +211,9 @@ class GamesDetailVC: UIViewController {
} }
@IBAction func closeBtnTapped(_ sender: UIButton) { @IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true) { if let postID = gameData?.id{
PersistentStorage.shared.addGamesCount(postID: postID)
} }
self.dismiss(animated: true)
} }
} }

View File

@@ -42,6 +42,13 @@ class GamesListVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
if let postID = vm.gameData[vm.indexToLoad].id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -57,10 +64,15 @@ class GamesListVC: UIViewController {
// MARK: - Tap Handler // MARK: - Tap Handler
@IBAction func gameBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func gameBtnTapped(_ sender: LocalisedElementsButton) {
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesWebViewVC) as! GamesWebViewVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesWebViewVC) as! GamesWebViewVC
//https://wokastaging.in/wokagames/Games/html/WokaLudo/index.php
let gameData = vm.gameData[vm.indexToLoad] let gameData = vm.gameData[vm.indexToLoad]
if let postID = gameData.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
vcPush.url = gameData.gameURL vcPush.url = gameData.gameURL
vcPush.orientation = gameData.screenOrientation vcPush.orientation = gameData.screenOrientation
vcPush.modalTransitionStyle = .crossDissolve vcPush.modalTransitionStyle = .crossDissolve
@@ -69,6 +81,8 @@ class GamesListVC: UIViewController {
} }
@IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
loadMoreBtn.isHidden = true loadMoreBtn.isHidden = true
vm.pageNo += 1 vm.pageNo += 1
loadMoreActivityIndicator.startAnimating() loadMoreActivityIndicator.startAnimating()
@@ -110,7 +124,9 @@ extension GamesListVC : TableViewSRC{
vm.setHeaderData() vm.setHeaderData()
let data = vm.gameData[indexPath.row] let data = vm.gameData[indexPath.row]
if let postID = data.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.Games, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesDetailVC) as! GamesDetailVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Games.gamesDetailVC) as! GamesDetailVC
vcPush.modalPresentationStyle = .overCurrentContext vcPush.modalPresentationStyle = .overCurrentContext

View File

@@ -12,6 +12,8 @@ class GamesWebViewVC: UIViewController {
var url : String? var url : String?
var orientation : ScreenOrientation? var orientation : ScreenOrientation?
var count = 0
var postID : Int?
@IBOutlet weak var webView: WKWebView! @IBOutlet weak var webView: WKWebView!
@@ -32,14 +34,18 @@ class GamesWebViewVC: UIViewController {
let link = URL(string: authUrl)! let link = URL(string: authUrl)!
let request = URLRequest(url: link) let request = URLRequest(url: link)
webView.load(request) webView.load(request)
webView.addTapGesture { [weak self] in
guard let self else{return}
count += 1
}
} }
// func rotateView(to angle: CGFloat) {
// // Apply rotation to the view's transform
// view.transform = CGAffineTransform(rotationAngle: angle)
// }
@IBAction func backBtnTapped(_ sender: UIButton) { @IBAction func backBtnTapped(_ sender: UIButton) {
if let postID = self.postID{
PersistentStorage.shared.addGamesCount(postID: postID)
}
let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.customAlerts, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.CustomAlerts.yesNoAlertVC) as! YesNoAlertVC
vcPush.mainTitleText = "Warning" vcPush.mainTitleText = "Warning"
@@ -50,6 +56,9 @@ class GamesWebViewVC: UIViewController {
guard let self else{return} guard let self else{return}
switch mode{ switch mode{
case .yes: case .yes:
if let postID = self.postID{
PersistentStorage.shared.addGamesCount(postID: postID)
}
if orientation == .landscape{ if orientation == .landscape{
appDelegate.deviceOrientation = .portrait appDelegate.deviceOrientation = .portrait
let value = UIInterfaceOrientation.portrait.rawValue let value = UIInterfaceOrientation.portrait.rawValue
@@ -61,6 +70,9 @@ class GamesWebViewVC: UIViewController {
} }
case .no: case .no:
if let postID = self.postID{
PersistentStorage.shared.addGamesCount(postID: postID)
}
print("no") print("no")
} }
} }

View File

@@ -140,6 +140,9 @@ class GamesListVM{
func updateFavLikes(type : FavCellCLick, index : Int){ func updateFavLikes(type : FavCellCLick, index : Int){
let data = gameData[index] let data = gameData[index]
if let postID = data.id{
PersistentStorage.shared.addGamesCount(postID: postID)
}
switch type { switch type {
case .favourite: case .favourite:
guard let isFav = data.markAsFavourite ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return} guard let isFav = data.markAsFavourite ,let postID = data.id,let postType = data.contentMoreDetails?.first?.postType else{return}
@@ -148,7 +151,7 @@ class GamesListVM{
if isDone{ if isDone{
gameData[index].markAsFavourite = false gameData[index].markAsFavourite = false
vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none) vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
K.GVar.reloadMyList = true K.GVar.reloadGames = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// if let indexRemove = MyListDataTemp.shareInstance.favListingData?.gameData?.firstIndex(where: {$0.id == postID}){ // if let indexRemove = MyListDataTemp.shareInstance.favListingData?.gameData?.firstIndex(where: {$0.id == postID}){
@@ -163,7 +166,7 @@ class GamesListVM{
if isDone{ if isDone{
gameData[index].markAsFavourite = true gameData[index].markAsFavourite = true
vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none) vc.gamesListingTableView.reloadRows(at: [IndexPath(row: index, section: 0)],with: .none)
K.GVar.reloadMyList = true K.GVar.reloadGames = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// let gameData = gameData[index] // let gameData = gameData[index]

View File

@@ -82,6 +82,33 @@ class MyListVC: UIViewController{
vm.getFavouriteListing() vm.getFavouriteListing()
} }
if K.GVar.reloadMyListAudioBooks{
MyListDataTemp.shareInstance.updateAudioBooks() { isDone in
if isDone{
self.audioBooksCV.reloadData()
}
}
K.GVar.reloadMyListAudioBooks = false
}
if K.GVar.reloadKaraoke{
MyListDataTemp.shareInstance.updateKaraoke() { isDone in
if isDone{
self.karaokeCV.reloadData()
}
}
K.GVar.reloadKaraoke = false
}
if K.GVar.reloadGames{
MyListDataTemp.shareInstance.updateGames() { isDone in
if isDone{
self.gamesCV.reloadData()
}
}
K.GVar.reloadGames = false
}
if K.GVar.myListSoftReload{ if K.GVar.myListSoftReload{
vm.reloadCollections() vm.reloadCollections()
vm.checkNil() vm.checkNil()

View File

@@ -25,7 +25,6 @@ class MyListViewAllVC: UIViewController {
// let color1 = #colorLiteral(red: 0, green: 0.4784313725, blue: 0.7529411765, alpha: 1) // let color1 = #colorLiteral(red: 0, green: 0.4784313725, blue: 0.7529411765, alpha: 1)
// let color2 = #colorLiteral(red: 0, green: 0.7529411765, blue: 0.7529411765, alpha: 1) // let color2 = #colorLiteral(red: 0, green: 0.7529411765, blue: 0.7529411765, alpha: 1)
// self.view.applyGradient(colors: [color1,color2], startPoint: .Point.left.point , endPoint: .Point.right.point) // self.view.applyGradient(colors: [color1,color2], startPoint: .Point.left.point , endPoint: .Point.right.point)
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage() navigationController?.navigationBar.shadowImage = UIImage()
} }

View File

@@ -6,6 +6,7 @@
// //
import Foundation import Foundation
import Alamofire
class MyListDataTemp{ class MyListDataTemp{
@@ -16,4 +17,121 @@ class MyListDataTemp{
var webSeriesHindi = [FavouriteListingDM.ResultData.ShowDatum]() var webSeriesHindi = [FavouriteListingDM.ResultData.ShowDatum]()
var isDatafetched = false var isDatafetched = false
// MARK: - Get Favourite Listing
func updateAudioBooks(onCompletion : @escaping (Bool) -> ()){
if !isDatafetched{
}
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token": AuthFunc.shareInstance.getAccessToken()]
let params : Parameters = ["post_type" : 7,
"api_version" : "v2",
"start" : 0,
"limit" : "3",
"category_id" : 0]
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Home.favourite_listing, method: .post,parameters : params, headers: headers) { [weak self](result : Result<BaseResponseModel<FavouriteListingDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0:
Utilities.dismissProgressHUD()
onCompletion(false)
case 1:
Utilities.dismissProgressHUD()
guard let audioData = data.data?.result?.audioData else{
onCompletion(false)
return
}
self?.favListingData?.audioData = audioData
onCompletion(true)
default:
onCompletion(false)
}
case .failure(let error):
print("Audio Error:- ", error)
onCompletion(false)
}
}
}
func updateKaraoke(onCompletion : @escaping (Bool) -> ()){
if !isDatafetched{
}
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token": AuthFunc.shareInstance.getAccessToken()]
let params : Parameters = ["post_type" : 8,
"api_version" : "v2",
"start" : 0,
"limit" : "3",
"category_id" : 0]
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Home.favourite_listing, method: .post,parameters : params, headers: headers) { [weak self](result : Result<BaseResponseModel<FavouriteListingDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0:
Utilities.dismissProgressHUD()
onCompletion(false)
case 1:
Utilities.dismissProgressHUD()
guard let singKaraokeData = data.data?.result?.singKaraokeData else{
onCompletion(false)
return
}
self?.favListingData?.singKaraokeData = singKaraokeData
onCompletion(true)
default:
onCompletion(false)
}
case .failure(let error):
print("Audio Error:- ", error)
onCompletion(false)
}
}
}
func updateGames(onCompletion : @escaping (Bool) -> ()){
if !isDatafetched{
}
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token": AuthFunc.shareInstance.getAccessToken()]
let params : Parameters = ["post_type" : 6,
"api_version" : "v2",
"start" : 0,
"limit" : "3",
"category_id" : 0]
NetworkManager.shareInstance.apiRequest(url: APIEndPoints.Home.favourite_listing, method: .post,parameters : params, headers: headers) { [weak self](result : Result<BaseResponseModel<FavouriteListingDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0:
Utilities.dismissProgressHUD()
onCompletion(false)
case 1:
Utilities.dismissProgressHUD()
guard let gameData = data.data?.result?.gameData else{
onCompletion(false)
return
}
self?.favListingData?.gameData = gameData
onCompletion(true)
default:
onCompletion(false)
}
case .failure(let error):
print("Audio Error:- ", error)
onCompletion(false)
}
}
}
} }

View File

@@ -57,6 +57,10 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
} }
@IBAction func startRecordingBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func startRecordingBtnTapped(_ sender: LocalisedElementsButton) {
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
self.playBtn.isEnabled = false self.playBtn.isEnabled = false
@@ -83,6 +87,9 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
} }
@IBAction func playBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func playBtnTapped(_ sender: LocalisedElementsButton) {
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
if !isPlaying { if !isPlaying {
vm.playMixedAudio() vm.playMixedAudio()
sender.setTitle("Pause", for: .normal) sender.setTitle("Pause", for: .normal)
@@ -110,19 +117,29 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
} }
@IBAction func downloadRecording(_ sender: LocalisedElementsButton) { @IBAction func downloadRecording(_ sender: LocalisedElementsButton) {
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
print("DownloadRecording") print("DownloadRecording")
vm.saveToFilesApp() vm.saveToFilesApp()
} }
@IBAction func backBtnTapped(_ sender: UIButton) { @IBAction func backBtnTapped(_ sender: UIButton) {
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
self.player.stop() self.player.stop()
self.dismiss(animated: true) self.dismiss(animated: true)
} }
@IBAction func retryBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func retryBtnTapped(_ sender: LocalisedElementsButton) {
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
retryKaraokeBtn.isHidden = true retryKaraokeBtn.isHidden = true
vm.setupKaraoke() vm.setupKaraoke()
} }
// MARK: - JWPlayerViewControllerDelegate // MARK: - JWPlayerViewControllerDelegate
override func jwplayer(_ player: any JWPlayer, didFinishLoadingWithTime loadTime: TimeInterval) { override func jwplayer(_ player: any JWPlayer, didFinishLoadingWithTime loadTime: TimeInterval) {
@@ -174,9 +191,24 @@ class JWKaraokePlayerVC: JWPlayerViewController, JWPlayerViewControllerDelegate
print("Buffering Reason:", reason) print("Buffering Reason:", reason)
} }
//When Player is Paused
override func jwplayer(_ player: JWPlayer, didPauseWithReason reason: JWPauseReason) { override func jwplayer(_ player: JWPlayer, didPauseWithReason reason: JWPauseReason) {
super.jwplayer(player, didPauseWithReason: reason) super.jwplayer(player, didPauseWithReason: reason)
// Implement custom behavior if reason == .interaction{
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
}
}
//When Player is Play
override func jwplayer(_ player: JWPlayer, isPlayingWithReason reason: JWPlayReason) {
super.jwplayer(player, isPlayingWithReason: reason)
if reason == .interaction{
if let postID = vm.postID{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
}
} }
} }

View File

@@ -54,11 +54,13 @@ class KaraokeDetailsVC: UIViewController {
@objc func handleTap(_ gesture: UITapGestureRecognizer) { @objc func handleTap(_ gesture: UITapGestureRecognizer) {
let location = gesture.location(in: outerView) let location = gesture.location(in: outerView)
if !contentView.frame.contains(location) { if !contentView.frame.contains(location) {
if let karaokeData , let postID = karaokeData.id{
PersistentStorage.shared.addKaraokeCount(postID: postID)
}
self.dismiss(animated: true) self.dismiss(animated: true)
} }
} }
func initView(){ func initView(){
if let karaokeData{ if let karaokeData{
if let url = karaokeData.thumbnailPath{ if let url = karaokeData.thumbnailPath{
@@ -126,14 +128,16 @@ class KaraokeDetailsVC: UIViewController {
if let karaokeData{ if let karaokeData{
guard let showID = karaokeData.id, let isFav = karaokeData.markAsFavourite, let postType = karaokeData.contentMoreDetails?.first?.postType else{return} guard let showID = karaokeData.id, let isFav = karaokeData.markAsFavourite, let postType = karaokeData.contentMoreDetails?.first?.postType else{return}
PersistentStorage.shared.addKaraokeCount(postID: showID)
if isFav { if isFav {
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.karaokeData?.markAsFavourite = false self.karaokeData?.markAsFavourite = false
if let index = MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.firstIndex(where: {$0.id == showID}){ // if let index = MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.firstIndex(where: {$0.id == showID}){
MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.remove(at: index) // MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.remove(at: index)
K.GVar.myListSoftReload = true // K.GVar.myListSoftReload = true
} // }
K.GVar.reloadKaraoke = true
//if coming from mylist //if coming from mylist
self.delegate?.updateRows(index: self.karaokeIndex, type: .favourite, isFav: false, isLike: nil, id: showID) self.delegate?.updateRows(index: self.karaokeIndex, type: .favourite, isFav: false, isLike: nil, id: showID)
@@ -143,10 +147,11 @@ class KaraokeDetailsVC: UIViewController {
LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in LikeFavCommonFunc.shareInstance.addFavourite(postID: showID, postType: postType, categoryID: 0, vc: self) { isDone in
self.karaokeData?.markAsFavourite = true self.karaokeData?.markAsFavourite = true
if let karaokeData = self.karaokeData{ // if let karaokeData = self.karaokeData{
MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.append(karaokeData) // MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.append(karaokeData)
K.GVar.myListSoftReload = true // K.GVar.myListSoftReload = true
} // }
K.GVar.reloadKaraoke = true
//if coming from mylist //if coming from mylist
self.delegate?.updateRows(index: self.karaokeIndex, type: .favourite, isFav: true, isLike: nil, id: showID) self.delegate?.updateRows(index: self.karaokeIndex, type: .favourite, isFav: true, isLike: nil, id: showID)
@@ -163,6 +168,7 @@ class KaraokeDetailsVC: UIViewController {
if let karaokeData{ if let karaokeData{
guard let showID = karaokeData.id, let isLiked = karaokeData.isLiked, let postType = karaokeData.contentMoreDetails?.first?.postType else{return} guard let showID = karaokeData.id, let isLiked = karaokeData.isLiked, let postType = karaokeData.contentMoreDetails?.first?.postType else{return}
PersistentStorage.shared.addKaraokeCount(postID: showID)
if isLiked{ if isLiked{
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self) { isDone in
@@ -196,7 +202,13 @@ class KaraokeDetailsVC: UIViewController {
} }
} }
shareView.addTapGesture { shareView.addTapGesture { [weak self] in
guard let self else{return}
if let karaokeData, let showID = karaokeData.id{
PersistentStorage.shared.addKaraokeCount(postID: showID)
}
if let name = URL(string: "https://apps.apple.com/in/app/woka/id6465305185"), !name.absoluteString.isEmpty { if let name = URL(string: "https://apps.apple.com/in/app/woka/id6465305185"), !name.absoluteString.isEmpty {
let objectsToShare = [name] let objectsToShare = [name]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
@@ -217,6 +229,10 @@ class KaraokeDetailsVC: UIViewController {
var itemBuild = JwPlayerItemCreate(url: "") var itemBuild = JwPlayerItemCreate(url: "")
var mp4URL = String() var mp4URL = String()
guard let postID = karaokeData?.id else{return}
PersistentStorage.shared.addKaraokeCount(postID: postID)
if AuthFunc.shareInstance.getDefaultLanguage() == .english{ if AuthFunc.shareInstance.getDefaultLanguage() == .english{
if let englishData = karaokeData?.contentMoreDetails?.filter({$0.languageMasterID == 1}).first{ if let englishData = karaokeData?.contentMoreDetails?.filter({$0.languageMasterID == 1}).first{
guard let url = englishData.url , let title = englishData.title, let englishMp4URL = englishData.videoUrlHd else{return} guard let url = englishData.url , let title = englishData.title, let englishMp4URL = englishData.videoUrlHd else{return}
@@ -255,7 +271,7 @@ class KaraokeDetailsVC: UIViewController {
vc.config = config vc.config = config
vc.vm.videoTitle = itemBuild.titles vc.vm.videoTitle = itemBuild.titles
vc.vm.videoUrl = mp4URL vc.vm.videoUrl = mp4URL
vc.vm.postID = postID
vc.modalPresentationStyle = .overFullScreen vc.modalPresentationStyle = .overFullScreen
vc.modalTransitionStyle = .crossDissolve vc.modalTransitionStyle = .crossDissolve
// vc.documentAudioUrl = url // vc.documentAudioUrl = url
@@ -275,6 +291,7 @@ class KaraokeDetailsVC: UIViewController {
} }
@IBAction func closeBtnTapped(_ sender: UIButton) { @IBAction func closeBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
self.dismiss(animated: true) self.dismiss(animated: true)
} }
} }

View File

@@ -34,6 +34,7 @@ class KaraokeListingVC: UIViewController {
vm.initView() vm.initView()
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationController?.navigationBar.shadowImage = UIImage() navigationController?.navigationBar.shadowImage = UIImage()
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
@@ -45,6 +46,11 @@ class KaraokeListingVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -60,11 +66,18 @@ class KaraokeListingVC: UIViewController {
} }
@IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
loadMoreBtn.isHidden = true loadMoreBtn.isHidden = true
vm.pageNo += 1 vm.pageNo += 1
loadMoreActivityIndicator.startAnimating() loadMoreActivityIndicator.startAnimating()
vm.getKaraokeListing(isBtnClick: true) vm.getKaraokeListing(isBtnClick: true)
} }
@IBAction func singBtnTapped(_ sender: LocalisedElementsButton) {
if let id = vm.headerData?.id{
PersistentStorage.shared.addKaraokeCount(postID: id)
}
}
} }
// MARK: - CollectionView Delegate and Data Source // MARK: - CollectionView Delegate and Data Source
@@ -84,7 +97,8 @@ extension KaraokeListingVC : CollectionViewSRC{
guard let postID = data.id ,let postType = data.contentMoreDetails?.first?.postType else{return} guard let postID = data.id ,let postType = data.contentMoreDetails?.first?.postType else{return}
let isFav = data.markAsFavourite let isFav = data.markAsFavourite
let isLiked = data.isLiked let isLiked = data.isLiked
PersistentStorage.shared.addKaraokeCount(postID: postID)
vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType) vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType)
} }
return cell return cell
@@ -93,7 +107,10 @@ extension KaraokeListingVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let data = vm.continueWatchingData[indexPath.row] let data = vm.continueWatchingData[indexPath.row]
if let id = data.id{
PersistentStorage.shared.addKaraokeCount(postID: id)
}
/* /*
Updated the top header data Updated the top header data
*/ */
@@ -161,6 +178,8 @@ extension KaraokeListingVC : TableViewSRC{
let isFav = data.markAsFavourite let isFav = data.markAsFavourite
let isLiked = data.isLiked let isLiked = data.isLiked
PersistentStorage.shared.addKaraokeCount(postID: postID)
vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType) vm.updateFavLikes(type: type, isFav: isFav, isLiked: isLiked, postID: postID, postType: postType)
} }
return cell return cell
@@ -171,6 +190,9 @@ extension KaraokeListingVC : TableViewSRC{
if vm.karaokeListData.count == 0 {return} if vm.karaokeListData.count == 0 {return}
let data = vm.karaokeListData[indexPath.row] let data = vm.karaokeListData[indexPath.row]
if let id = data.id{
PersistentStorage.shared.addKaraokeCount(postID: id)
}
/* /*
Updated the top header data Updated the top header data
*/ */

View File

@@ -87,6 +87,9 @@
<integer key="value" value="25"/> <integer key="value" value="25"/>
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections>
<action selector="singBtnTapped:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="6HL-qZ-aeQ"/>
</connections>
</button> </button>
</subviews> </subviews>
</stackView> </stackView>

View File

@@ -19,6 +19,9 @@ class JWKaraokePlayerVM{
var videoTitle : String? var videoTitle : String?
var videoUrl : String? var videoUrl : String?
//for mapping the post
var postID : Int?
//Start and end time for trimming the audio //Start and end time for trimming the audio
var startTime : TimeInterval? var startTime : TimeInterval?
var endTime : TimeInterval? var endTime : TimeInterval?

View File

@@ -190,7 +190,7 @@ class KaraokeListingVM{
if let showListIndex = karaokeListData.firstIndex(where: { $0.id == postID }){ if let showListIndex = karaokeListData.firstIndex(where: { $0.id == postID }){
karaokeListData[showListIndex].markAsFavourite = false karaokeListData[showListIndex].markAsFavourite = false
vc.karaokeListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none) vc.karaokeListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none)
K.GVar.reloadMyList = true K.GVar.reloadKaraoke = true
// // MyList Update // // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// if let indexRemove = MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.firstIndex(where: {$0.id == postID}){ // if let indexRemove = MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.firstIndex(where: {$0.id == postID}){
@@ -207,7 +207,7 @@ class KaraokeListingVM{
if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){ if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){
continueWatchingData[continueWatchingIndex].markAsFavourite = false continueWatchingData[continueWatchingIndex].markAsFavourite = false
vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)]) vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)])
K.GVar.reloadMyList = true K.GVar.reloadKaraoke = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// if let indexRemove = MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.firstIndex(where: {$0.id == postID}){ // if let indexRemove = MyListDataTemp.shareInstance.favListingData?.singKaraokeData?.firstIndex(where: {$0.id == postID}){
@@ -225,7 +225,7 @@ class KaraokeListingVM{
if let showListIndex = karaokeListData.firstIndex(where: { $0.id == postID }){ if let showListIndex = karaokeListData.firstIndex(where: { $0.id == postID }){
karaokeListData[showListIndex].markAsFavourite = true karaokeListData[showListIndex].markAsFavourite = true
vc.karaokeListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none) vc.karaokeListingTableView.reloadRows(at: [IndexPath(row: showListIndex, section: 0)],with: .none)
K.GVar.reloadMyList = true K.GVar.reloadKaraoke = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// let karaokeData = karaokeListData[showListIndex] // let karaokeData = karaokeListData[showListIndex]
@@ -241,7 +241,7 @@ class KaraokeListingVM{
if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){ if let continueWatchingIndex = continueWatchingData.firstIndex(where: { $0.id == postID }){
continueWatchingData[continueWatchingIndex].markAsFavourite = true continueWatchingData[continueWatchingIndex].markAsFavourite = true
vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)]) vc.continueWatchingCV.reloadItems(at: [IndexPath(row: continueWatchingIndex, section: 0)])
K.GVar.reloadMyList = true K.GVar.reloadKaraoke = true
// MyList Update // MyList Update
// if MyListDataTemp.shareInstance.isDatafetched{ // if MyListDataTemp.shareInstance.isDatafetched{
// // if data is updated for main list this ill not work // // if data is updated for main list this ill not work

View File

@@ -27,7 +27,7 @@
*/ */
"Forgot your Password?" = "अपना पासवर्ड भूल गए?"; "Forgot your Password?" = "अपना पासवर्ड भूल गए?";
"PLEASE GIVE US YOUR USERNAME" = "कृपया हमें अपना उपयोगकर्ता नाम दें"; "PLEASE GIVE US YOUR USERNAME" = "कृपया हमें अपना उपयोगकर्ता नाम दें";
"We will send a reset code to their email" = "हम आपके माता-पिता के ईमेल पर एक रीसेट कोड भेजेंगे"; "We will send a reset code to email" = "हम आपके ईमेल पर एक रीसेट कोड भेजेंगे";
/* /*
Create PAssword VC Create PAssword VC

View File

@@ -49,17 +49,26 @@ class OnBoardVC: UIViewController {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
vm.stopBackGroundAnimationJSON() vm.stopBackGroundAnimationJSON()
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
// MARK: - Button Tap Handler // MARK: - Button Tap Handler
@IBAction func createAccountBtnTapped(_ sender: UIButton) { @IBAction func createAccountBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
let sb = UIStoryboard(name: K.StoryBoard.main, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.main, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.OnBoarding.selectAgeVC) as! SelectAgeVC let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.OnBoarding.selectAgeVC) as! SelectAgeVC
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
@IBAction func loginBtnTapped(_ sender: UIButton) { @IBAction func loginBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.authenticationSB, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.loginVC) as! LoginVC let vc = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Authentication.loginVC) as! LoginVC
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
@@ -67,6 +76,7 @@ class OnBoardVC: UIViewController {
@IBAction func guestLoginBtnTapped(_ sender: UIButton) { @IBAction func guestLoginBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
vm.guestLogin() vm.guestLogin()
} }

View File

@@ -42,10 +42,11 @@ class SelectAgeVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
// MARK: - Button Tap Handler
} }

View File

@@ -32,7 +32,8 @@ class SplashVC: UIViewController {
} }
@IBAction func languageBtnTapped(_ sender: UIButton) { @IBAction func languageBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
switch sender{ switch sender{
case hindiBtn: case hindiBtn:
AuthFunc.shareInstance.languageSelected = .hindi AuthFunc.shareInstance.languageSelected = .hindi

View File

@@ -10,8 +10,10 @@ import Foundation
struct GuestDataDM: Codable { struct GuestDataDM: Codable {
var username: String? var username: String?
var fullname: String? var fullname: String?
var newGuest: Bool?
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case username, fullname case username, fullname
case newGuest = "new_guest"
} }
} }

View File

@@ -38,6 +38,7 @@ class SelectAgeVM{
} }
@objc func kid() { @objc func kid() {
PersistentStorage.shared.addOthersCount()
// Apply click effect animation // Apply click effect animation
UIView.animate(withDuration: 0.1, animations: { UIView.animate(withDuration: 0.1, animations: {
self.vc.underAgeView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9) self.vc.underAgeView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
@@ -51,6 +52,7 @@ class SelectAgeVM{
} }
@objc func adult() { @objc func adult() {
PersistentStorage.shared.addOthersCount()
// Apply click effect animation // Apply click effect animation
UIView.animate(withDuration: 0.1, animations: { UIView.animate(withDuration: 0.1, animations: {
self.vc.aboveAgeView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9) self.vc.aboveAgeView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)

View File

@@ -16,8 +16,6 @@ class SplashVM{
var player: AVAudioPlayer? var player: AVAudioPlayer?
func initView(){ func initView(){
// Analytics.logEvent(K.AnalyticsEventKeys.guest_login_iOS, parameters: nil)
AuthFunc.shareInstance.getStaticURLs() AuthFunc.shareInstance.getStaticURLs()
vc.activityIndicator.hidesWhenStopped = true vc.activityIndicator.hidesWhenStopped = true
let color1 = #colorLiteral(red: 0.144693464, green: 0.1426281333, blue: 0.6686832905, alpha: 1) let color1 = #colorLiteral(red: 0.144693464, green: 0.1426281333, blue: 0.6686832905, alpha: 1)

View File

@@ -285,6 +285,26 @@ final class PersistentStorage
PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks) PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks)
} }
func addKaraokeCount(postID : Int){
let userClicks = UserClickData(clickCounts: 1, categoryId: 0, postId: postID, postType: PostType.karaokeVideo.rawValue)
PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks)
}
func addAudioCount(postID : Int){
let userClicks = UserClickData(clickCounts: 1, categoryId: 0, postId: postID, postType: PostType.audio.rawValue)
PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks)
}
func addGamesCount(postID : Int){
let userClicks = UserClickData(clickCounts: 1, categoryId: 0, postId: postID, postType: PostType.game.rawValue)
PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks)
}
func addShopCount(postID : Int){
let userClicks = UserClickData(clickCounts: 1, categoryId: 0, postId: postID, postType: PostType.shopProduct.rawValue)
PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks)
}
func addRadioCount(){ func addRadioCount(){
guard let postID = AuthFunc.shareInstance.staticURLs?.liveFmData?.id else{return} guard let postID = AuthFunc.shareInstance.staticURLs?.liveFmData?.id else{return}
let userClicks = UserClickData(clickCounts: 1, categoryId: 0, postId: postID, postType: PostType.FM.rawValue) let userClicks = UserClickData(clickCounts: 1, categoryId: 0, postId: postID, postType: PostType.FM.rawValue)
@@ -302,8 +322,8 @@ final class PersistentStorage
PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks) PersistentStorage.shared.checkIfExist( key: .post_type,clicksData: userClicks)
} }
func addWebSeries(catID : Int, postID : Int){ func addWebSeries(catID : Int, postID : Int, postType : PostType){
let userClicks = UserClickData(clickCounts: 1, categoryId: catID, postId: postID, postType: PostType.series.rawValue) let userClicks = UserClickData(clickCounts: 1, categoryId: catID, postId: postID, postType: postType.rawValue)
PersistentStorage.shared.checkWebSeries(clicksData: userClicks) PersistentStorage.shared.checkWebSeries(clicksData: userClicks)
} }
} }

View File

@@ -49,6 +49,10 @@ class ProductDetailsVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -63,6 +67,9 @@ class ProductDetailsVC: UIViewController {
} }
@IBAction func addToCartBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func addToCartBtnTapped(_ sender: LocalisedElementsButton) {
if let postID = vm.productDetails?.id{
PersistentStorage.shared.addShopCount(postID: postID)
}
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
if sender.titleLabel?.text == "Add to Cart"{ if sender.titleLabel?.text == "Add to Cart"{

View File

@@ -37,6 +37,10 @@ class ShopCategoryVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -63,6 +67,10 @@ extension ShopCategoryVC : TableViewSRC{
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let data = vm.categoryData[indexPath.row] let data = vm.categoryData[indexPath.row]
if let catID = data.id{
PersistentStorage.shared.addShopCount(postID: catID)
}
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopProductsVC) as! ShopProductsVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopProductsVC) as! ShopProductsVC
vcPush.vm.categoryID = data.id vcPush.vm.categoryID = data.id

View File

@@ -36,6 +36,10 @@ class ShopListingVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -69,6 +73,9 @@ extension ShopListingVC : TableViewSRC{
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if vm.superCatData.count == 0 {return} if vm.superCatData.count == 0 {return}
let superCatID = vm.superCatData[indexPath.row].id let superCatID = vm.superCatData[indexPath.row].id
if let superCatID{
PersistentStorage.shared.addShopCount(postID: superCatID)
}
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopCategoryVC) as! ShopCategoryVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.shopCategoryVC) as! ShopCategoryVC
vcPush.vm.superCatID = superCatID vcPush.vm.superCatID = superCatID

View File

@@ -40,6 +40,10 @@ class ShopProductsVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -92,12 +96,21 @@ extension ShopProductsVC : CollectionViewSRC{
switch collectionView{ switch collectionView{
case productCV: case productCV:
let data = vm.shopProductsData[indexPath.row] let data = vm.shopProductsData[indexPath.row]
if let postID = data.id{
PersistentStorage.shared.addShopCount(postID: postID)
}
let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.shop, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.productDetailsVC) as! ProductDetailsVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.Shop.productDetailsVC) as! ProductDetailsVC
vcPush.vm.productID = data.id vcPush.vm.productID = data.id
self.navigationController?.pushViewController(vcPush, animated: true) self.navigationController?.pushViewController(vcPush, animated: true)
case subCategoryCV: case subCategoryCV:
if let selectedSubCategory = vm.subCategoryData[indexPath.row].id{ if let selectedSubCategory = vm.subCategoryData[indexPath.row].id{
if selectedSubCategory == -1{
PersistentStorage.shared.addShopCount(postID: 0)
}else{
PersistentStorage.shared.addShopCount(postID: selectedSubCategory)
}
vm.selectedSubCategory = selectedSubCategory vm.selectedSubCategory = selectedSubCategory
self.subCategoryCV.reloadData() self.subCategoryCV.reloadData()
Utilities.startProgressHUD() Utilities.startProgressHUD()

View File

@@ -29,6 +29,7 @@ class ProductDetailsVM{
} }
@objc func cartButtonTapped(){ @objc func cartButtonTapped(){
PersistentStorage.shared.addShopCount(postID: 0)
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)

View File

@@ -26,6 +26,8 @@ class ShopCategoryVM{
} }
@objc func cartButtonTapped(){ @objc func cartButtonTapped(){
PersistentStorage.shared.addShopCount(postID: 0)
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)

View File

@@ -36,6 +36,7 @@ class ShopListingVM{
} }
@objc func cartButtonTapped(){ @objc func cartButtonTapped(){
PersistentStorage.shared.addShopCount(postID: 0)
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)

View File

@@ -31,6 +31,8 @@ class ShopProductsVM{
} }
@objc func cartButtonTapped(){ @objc func cartButtonTapped(){
PersistentStorage.shared.addShopCount(postID: 0)
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)

View File

@@ -33,6 +33,10 @@ class MyOrdersVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated) navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -55,7 +59,7 @@ extension MyOrdersVC : TableViewSRC{
cell.btnTapped = { [weak self] in cell.btnTapped = { [weak self] in
guard let self else{return} guard let self else{return}
PersistentStorage.shared.addShopCount(postID: 0)
let sb = UIStoryboard(name: K.StoryBoard.sideBarNav, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.sideBarNav, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.SideBarNav.myOrderDetailsVC) as! MyOrderDetailsVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.SideBarNav.myOrderDetailsVC) as! MyOrderDetailsVC
let orderID = vm.orderData[indexPath.row].orderID let orderID = vm.orderData[indexPath.row].orderID

View File

@@ -59,6 +59,8 @@ class MyOrdersVM{
} }
@objc func cartButtonTapped(){ @objc func cartButtonTapped(){
PersistentStorage.shared.addShopCount(postID: 0)
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.cart, bundle: nil)

View File

@@ -740,7 +740,6 @@
</buttonConfiguration> </buttonConfiguration>
<connections> <connections>
<action selector="retryBtnTapped:" destination="GSM-1I-akm" eventType="touchUpInside" id="NLL-cG-WkI"/> <action selector="retryBtnTapped:" destination="GSM-1I-akm" eventType="touchUpInside" id="NLL-cG-WkI"/>
<action selector="retryBtnTapped:" destination="JL8-U7-koy" eventType="touchUpInside" id="RNx-NX-4xp"/>
</connections> </connections>
</button> </button>
</subviews> </subviews>
@@ -1320,10 +1319,10 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor> </systemColor>
<systemColor name="systemBrownColor"> <systemColor name="systemBrownColor">
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.63529411764705879" green="0.51764705882352946" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor> </systemColor>
<systemColor name="systemGreenColor"> <systemColor name="systemGreenColor">
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor> </systemColor>
</resources> </resources>
</document> </document>

View File

@@ -69,6 +69,7 @@ class ThemeTwoVC: UIViewController {
} }
@IBAction func playTrailer(_ sender: LocalisedElementsButton) { @IBAction func playTrailer(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
let item = JwPlayerItemCreate(url: APIEndPoints.StaticURLs.masilaUrl, poster: nil, titles: "Masila") let item = JwPlayerItemCreate(url: APIEndPoints.StaticURLs.masilaUrl, poster: nil, titles: "Masila")
JWPlayerManager.shared.presentPlayer(from: self, playerItems: [item], contentType: .trailer) JWPlayerManager.shared.presentPlayer(from: self, playerItems: [item], contentType: .trailer)
} }
@@ -90,18 +91,25 @@ extension ThemeTwoVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
switch indexPath.row{ switch indexPath.row{
case 0: case 0:
PersistentStorage.shared.addRadioCount()
vm.checkType(action: .radio) vm.checkType(action: .radio)
case 1: case 1:
PersistentStorage.shared.addOthersCount()
vm.checkType(action: .liveTV) vm.checkType(action: .liveTV)
case 2: case 2:
PersistentStorage.shared.addOthersCount()
vm.checkType(action: .webseries) vm.checkType(action: .webseries)
case 3: case 3:
PersistentStorage.shared.addOthersCount()
vm.checkType(action: .games) vm.checkType(action: .games)
case 4: case 4:
PersistentStorage.shared.addOthersCount()
vm.checkType(action: .audioBooks) vm.checkType(action: .audioBooks)
case 5: case 5:
PersistentStorage.shared.addOthersCount()
vm.checkType(action: .karaoke) vm.checkType(action: .karaoke)
case 6: case 6:
PersistentStorage.shared.addOthersCount()
vm.checkType(action: .shop) vm.checkType(action: .shop)
default: default:
break break

View File

@@ -40,9 +40,15 @@ class UserNotificationVC: UIViewController {
// Customize the navigation bar's appearance // Customize the navigation bar's appearance
self.navigationController?.setColor(color: .black) self.navigationController?.setColor(color: .black)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
@IBAction func retryBtnTapped(_ sender: UIButton) { @IBAction func retryBtnTapped(_ sender: UIButton) {
PersistentStorage.shared.addOthersCount()
} }
} }
@@ -62,6 +68,7 @@ extension UserNotificationVC : TableViewSRC{
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
PersistentStorage.shared.addOthersCount()
if let type = vm.userNotification[indexPath.row].postType{ if let type = vm.userNotification[indexPath.row].postType{
switch type{ switch type{
case 1,2,3,4: case 1,2,3,4:

View File

@@ -40,6 +40,7 @@ class ThemeTwoVM{
handleNotificationCenter() handleNotificationCenter()
vc.liveTvView.addTapGesture { [weak self] in vc.liveTvView.addTapGesture { [weak self] in
PersistentStorage.shared.addOthersCount()
guard let self else{return} guard let self else{return}
self.playLiveTV() self.playLiveTV()
} }

View File

@@ -32,6 +32,7 @@ class ContinueWatchingVC: UIViewController {
@objc func handleTap(_ gesture: UITapGestureRecognizer) { @objc func handleTap(_ gesture: UITapGestureRecognizer) {
let location = gesture.location(in: outerView) let location = gesture.location(in: outerView)
if !contentView.frame.contains(location) { if !contentView.frame.contains(location) {
PersistentStorage.shared.addOthersCount()
self.dismiss(animated: true) self.dismiss(animated: true)
} }
} }
@@ -64,6 +65,10 @@ class ContinueWatchingVC: UIViewController {
@IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) {
guard let watchData else{return} guard let watchData else{return}
if let showID = watchData.id, let catID = self.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: showID, postType: .episode)
}
var playerItem = JwPlayerItemCreate(url: "", poster: "", titles: "") var playerItem = JwPlayerItemCreate(url: "", poster: "", titles: "")
playerItem.poster = watchData.thumbnailPath playerItem.poster = watchData.thumbnailPath
if AuthFunc.shareInstance.getDefaultLanguage() == .english{ if AuthFunc.shareInstance.getDefaultLanguage() == .english{
@@ -88,8 +93,7 @@ class ContinueWatchingVC: UIViewController {
} }
@IBAction func closeBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func closeBtnTapped(_ sender: LocalisedElementsButton) {
self.dismiss(animated: true) { PersistentStorage.shared.addOthersCount()
self.dismiss(animated: true)
}
} }
} }

View File

@@ -90,9 +90,13 @@ class EpisodeDetailsVC: UIViewController {
@IBAction func closeBtnTapped(_ sender: UIButton) { @IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true) self.dismiss(animated: true)
PersistentStorage.shared.addOthersCount()
} }
@IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func watchBtnTapped(_ sender: LocalisedElementsButton) {
if let episodeData = episodeData, let postID = episodeData.id, let categoryID = (AuthFunc.shareInstance.languageSelected == .english ? 1 : 18){
PersistentStorage.shared.addWebSeries(catID: categoryID, postID: postID, postType: .episode)
}
self.dismiss(animated: true) { self.dismiss(animated: true) {
self.onDoneBlock?() self.onDoneBlock?()
} }

View File

@@ -66,6 +66,10 @@ class WebSeriesSeasonVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -75,13 +79,16 @@ class WebSeriesSeasonVC: UIViewController {
self.navigationController?.setColor(color: .black) self.navigationController?.setColor(color: .black)
} }
@IBAction func playTrailerBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func playTrailerBtnTapped(_ sender: LocalisedElementsButton) {
// 1-> english , 18- hindi // 1-> english , 18- hindi
var playerItems = [JwPlayerItemCreate]() var playerItems = [JwPlayerItemCreate]()
guard let seasonData = vm.seasonListingData.filter({$0.id == vm.episodeSelectedCateogory}).first else{return} guard let seasonData = vm.seasonListingData.filter({$0.id == vm.episodeSelectedCateogory}).first else{return}
var url = String() var url = String()
guard let englishData = seasonData.seasonMoreDetails?.filter({$0.languageMasterID == 1}).first, let hindiData = seasonData.seasonMoreDetails?.filter({$0.languageMasterID == 2}).first else{return} guard let englishData = seasonData.seasonMoreDetails?.filter({$0.languageMasterID == 1}).first, let hindiData = seasonData.seasonMoreDetails?.filter({$0.languageMasterID == 2}).first else{return}
if let seasonID = seasonData.id , let catID = vm.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: seasonID, postType: .season)
}
/* /*
Based on selected Category language update the url Based on selected Category language update the url
*/ */
@@ -104,6 +111,7 @@ class WebSeriesSeasonVC: UIViewController {
} }
@IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
loadMoreBtn.isHidden = true loadMoreBtn.isHidden = true
vm.pageNo += 1 vm.pageNo += 1
loadMoreActivityIndicator.startAnimating() loadMoreActivityIndicator.startAnimating()
@@ -154,6 +162,10 @@ extension WebSeriesSeasonVC : TableViewSRC{
case self.teaserTableView: case self.teaserTableView:
let teaserData = vm.teaserData[indexPath.row] let teaserData = vm.teaserData[indexPath.row]
if let showID = teaserData.id, let catID = self.vm.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: showID, postType: .teaser)
}
guard let englishData = teaserData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let hindiData = teaserData.contentMoreDetails?.filter({$0.languageMasterID == 2}).first else{return} guard let englishData = teaserData.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let hindiData = teaserData.contentMoreDetails?.filter({$0.languageMasterID == 2}).first else{return}
var url = String() var url = String()
/* /*
@@ -224,6 +236,11 @@ extension WebSeriesSeasonVC : TableViewSRC{
case self.episodeTableView: case self.episodeTableView:
let episodeData = vm.seasonEpisodeData let episodeData = vm.seasonEpisodeData
if let showID = episodeData[indexPath.row].id, let catID = self.vm.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: showID, postType: .episode)
}
for i in episodeData{ for i in episodeData{
var url = String() var url = String()
guard let englishData = i.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let hindiData = i.contentMoreDetails?.filter({$0.languageMasterID == 2}).first else{return} guard let englishData = i.contentMoreDetails?.filter({$0.languageMasterID == 1}).first, let hindiData = i.contentMoreDetails?.filter({$0.languageMasterID == 2}).first else{return}
@@ -263,9 +280,15 @@ extension WebSeriesSeasonVC : TableViewSRC{
switch tableView{ switch tableView{
case teaserTableView: case teaserTableView:
let data = vm.teaserData[indexPath.row] let data = vm.teaserData[indexPath.row]
if let showID = data.id, let catID = self.vm.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: showID, postType: .teaser)
}
vcPush.teaserData = data vcPush.teaserData = data
default: default:
let data = vm.seasonEpisodeData[indexPath.row] let data = vm.seasonEpisodeData[indexPath.row]
if let showID = data.id, let catID = self.vm.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: showID, postType: .episode)
}
vcPush.episodeData = data vcPush.episodeData = data
} }
vcPush.onDoneBlock = { [weak self] in vcPush.onDoneBlock = { [weak self] in
@@ -350,6 +373,11 @@ extension WebSeriesSeasonVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
vm.episodeSelectedCateogory = vm.seasonListingData[indexPath.row].id vm.episodeSelectedCateogory = vm.seasonListingData[indexPath.row].id
if let seasonID = vm.seasonListingData[indexPath.row].id , let catID = vm.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: seasonID, postType: .season)
}
vm.setSeasonData() vm.setSeasonData()
episodeTitle.isHidden = false episodeTitle.isHidden = false
episodeTitle.text = "" episodeTitle.text = ""

View File

@@ -56,6 +56,11 @@ class WebSeriesVC: UIViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: animated) self.navigationController?.setNavigationBarHidden(true, animated: animated)
if self.isMovingFromParent {
// Back button was pressed
PersistentStorage.shared.addOthersCount()
}
} }
override func viewDidDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
@@ -74,20 +79,24 @@ class WebSeriesVC: UIViewController {
@IBAction func playTrailer(_ sender: LocalisedElementsButton) { @IBAction func playTrailer(_ sender: LocalisedElementsButton) {
let item = JwPlayerItemCreate(url: APIEndPoints.StaticURLs.masilaUrl, poster: nil, titles: "Masila") let item = JwPlayerItemCreate(url: APIEndPoints.StaticURLs.masilaUrl, poster: nil, titles: "Masila")
JWPlayerManager.shared.presentPlayer(from: self, playerItems: [item], contentType: .trailer) JWPlayerManager.shared.presentPlayer(from: self, playerItems: [item], contentType: .trailer)
PersistentStorage.shared.addTrailerCount()
} }
@IBAction func expandLanguageTapped(_ sender: UIButton) { @IBAction func expandLanguageTapped(_ sender: UIButton) {
vm.dropDownModule.show() vm.dropDownModule.show()
PersistentStorage.shared.addOthersCount()
self.expandBtn.setImage(UIImage(named: "SupportUpArrow"), for: .normal) self.expandBtn.setImage(UIImage(named: "SupportUpArrow"), for: .normal)
} }
@IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) { @IBAction func loadMoreBtnTapped(_ sender: LocalisedElementsButton) {
PersistentStorage.shared.addOthersCount()
loadMoreBtn.isHidden = true loadMoreBtn.isHidden = true
vm.pageNo += 1 vm.pageNo += 1
loadMoreActivityIndicator.startAnimating() loadMoreActivityIndicator.startAnimating()
if let index = vm.dropDownModule.indexForSelectedRow, let categoryIndex = vm.categoryListingData[index].id{ if let index = vm.dropDownModule.indexForSelectedRow, let categoryIndex = vm.categoryListingData[index].id{
vm.getShowListing(categoryID: categoryIndex, isBtnClick: true) vm.getShowListing(categoryID: categoryIndex, isBtnClick: true)
} }
PersistentStorage.shared.addOthersCount()
} }
} }
@@ -120,6 +129,10 @@ extension WebSeriesVC : TableViewSRC{
func updateFavLikes(type : FavCellCLick, index : Int){ func updateFavLikes(type : FavCellCLick, index : Int){
let data = vm.showData[index] let data = vm.showData[index]
if let postID = data.id, let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id{
PersistentStorage.shared.addWebSeries(catID: categoryID, postID: postID, postType: .series)
}
let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id ?? 0 let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id ?? 0
switch type { switch type {
case .favourite: case .favourite:
@@ -231,6 +244,10 @@ extension WebSeriesVC : TableViewSRC{
if vm.showData.count == 0 {return} if vm.showData.count == 0 {return}
let showData = vm.showData[indexPath.row] let showData = vm.showData[indexPath.row]
if let postID = showData.id, let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id{
PersistentStorage.shared.addWebSeries(catID: categoryID, postID: postID, postType: .series)
}
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesSeasonVC) as! WebSeriesSeasonVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.webSeriesSeasonVC) as! WebSeriesSeasonVC
vcPush.vm.showData = showData vcPush.vm.showData = showData
@@ -295,6 +312,10 @@ extension WebSeriesVC : CollectionViewSRC{
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let data = vm.continueWatchingData[indexPath.row] let data = vm.continueWatchingData[indexPath.row]
if let postID = data.id, let categoryID = vm.categoryListingData[vm.dropDownModule.indexForSelectedRow ?? 0].id{
PersistentStorage.shared.addWebSeries(catID: categoryID, postID: postID, postType: .series)
}
let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil) let sb = UIStoryboard(name: K.StoryBoard.webSeries, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.continueWatchingVC) as! ContinueWatchingVC let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.WebSeries.continueWatchingVC) as! ContinueWatchingVC
vcPush.modalPresentationStyle = .overCurrentContext vcPush.modalPresentationStyle = .overCurrentContext

View File

@@ -43,7 +43,8 @@ class WebSeriesSeasonVM{
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
guard let self ,let indexSelected, let categoryID, let showData, let showID = showData.id, let isFav = showData.markAsFavourite, let postType = showData.contentMoreDetails?.first?.postType else{return} guard let self ,let indexSelected, let categoryID, let showData, let showID = showData.id, let isFav = showData.markAsFavourite, let postType = showData.contentMoreDetails?.first?.postType else{return}
PersistentStorage.shared.addWebSeries(catID: categoryID, postID: showID, postType: .series)
if isFav { if isFav {
//remove //remove
LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: categoryID, vc: self.vc) { isDone in LikeFavCommonFunc.shareInstance.removeFavourite(postID: showID, postType: postType, categoryID: categoryID, vc: self.vc) { isDone in
@@ -92,7 +93,8 @@ class WebSeriesSeasonVM{
if AuthFunc.shareInstance.guestUserLoginPopUp() { return} if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
guard let self ,let indexSelected, let showData, let showID = showData.id, let isLiked = showData.isLiked, let postType = showData.contentMoreDetails?.first?.postType else{return} guard let self ,let indexSelected, let showData, let showID = showData.id, let isLiked = showData.isLiked, let postType = showData.contentMoreDetails?.first?.postType else{return}
PersistentStorage.shared.addWebSeries(catID: self.categoryID ?? 0, postID: showID, postType: .series)
if isLiked{ if isLiked{
LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self.vc) { isDone in LikeFavCommonFunc.shareInstance.unlikePost(postID: showID, postType: postType, vc: self.vc) { isDone in
self.showData?.isLiked = false self.showData?.isLiked = false
@@ -139,6 +141,10 @@ class WebSeriesSeasonVM{
} }
vc.shareView.addTapGesture { vc.shareView.addTapGesture {
if let showID = self.showData?.id, let catID = self.categoryID{
PersistentStorage.shared.addWebSeries(catID: catID, postID: showID, postType: .series)
}
if let name = URL(string: "https://apps.apple.com/in/app/woka/id6465305185"), !name.absoluteString.isEmpty { if let name = URL(string: "https://apps.apple.com/in/app/woka/id6465305185"), !name.absoluteString.isEmpty {
let objectsToShare = [name] let objectsToShare = [name]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)

View File

@@ -99,10 +99,12 @@ class WebSeriesVM{
// handle if user clicks outside // handle if user clicks outside
dropDownModule.cancelAction = { [weak self] in dropDownModule.cancelAction = { [weak self] in
guard let self else{return} guard let self else{return}
PersistentStorage.shared.addOthersCount()
vc.expandBtn.setImage(UIImage(named: "SupportBottomArrow"), for: .normal) vc.expandBtn.setImage(UIImage(named: "SupportBottomArrow"), for: .normal)
} }
dropDownModule.selectionAction = { [weak self] (index: Int, item: String) in dropDownModule.selectionAction = { [weak self] (index: Int, item: String) in
PersistentStorage.shared.addOthersCount()
guard let self else{return} guard let self else{return}
vc.languageLabel.text = item vc.languageLabel.text = item
vc.expandBtn.setImage(UIImage(named: "SupportBottomArrow"), for: .normal) vc.expandBtn.setImage(UIImage(named: "SupportBottomArrow"), for: .normal)