- updated flow for username, made it selectable and move it to login screen
- Update scripts for firebase crashlytics. - fixed bug for webseries, top ads, if internet not connected again checking it at retry
This commit is contained in:
@@ -29,6 +29,16 @@ class LoginVC: UIViewController {
|
||||
// self.passwordTF.text = "Admin@123"
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
/*
|
||||
if user has selected the username from forgot username screen update it here.
|
||||
*/
|
||||
if let username = K.GVar.selectedUsername{
|
||||
self.userNameTF.text = username
|
||||
K.GVar.selectedUsername = nil
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func loginBtnTapped(_ sender: LocalisedElementsButton) {
|
||||
PersistentStorage.shared.addOthersCount()
|
||||
guard let userName = userNameTF.text?.trimmingCharacters(in: .whitespaces) , let pass = passwordTF.text?.trimmingCharacters(in: .whitespaces) else{return}
|
||||
|
||||
@@ -38,6 +38,12 @@ class UsernameCheckVC: UIViewController {
|
||||
|
||||
@IBAction func goToLoginTapped(_ sender: LocalisedElementsButton) {
|
||||
navigationController?.setNavigationBarHidden(true, animated: true)
|
||||
/*
|
||||
if user selects any user name add it to gvar
|
||||
*/
|
||||
if let selectedUserName = userData.filter({$0.isSelected == true}).first?.username{
|
||||
K.GVar.selectedUsername = selectedUserName
|
||||
}
|
||||
self.navigationController?.popToViewController(of: LoginVC.self, animated: true)
|
||||
}
|
||||
}
|
||||
@@ -59,4 +65,15 @@ extension UsernameCheckVC : TableViewSRC{
|
||||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
return 100
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
if userData[indexPath.row].isSelected == true {
|
||||
return
|
||||
}
|
||||
for i in 0..<userData.count {
|
||||
userData[i].isSelected = false
|
||||
}
|
||||
userData[indexPath.row].isSelected = true
|
||||
tableView.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,5 @@ import Foundation
|
||||
// MARK: - UserNameDM
|
||||
struct UserNameDM: Codable {
|
||||
let username: String?
|
||||
var isSelected : Bool? = false
|
||||
}
|
||||
|
||||
@@ -17,10 +17,13 @@ class LinkedChildCell: UITableViewCell {
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
outerView.roundCorner(radius: 15)
|
||||
imageSupportView.roundCorner()
|
||||
outerView.backgroundColor = .white.withAlphaComponent(0.5)
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
imageSupportView.roundCorner()
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
super.setSelected(selected, animated: animated)
|
||||
|
||||
@@ -37,5 +40,16 @@ class LinkedChildCell: UITableViewCell {
|
||||
func setLinkedData(data : UserNameDM){
|
||||
self.childName.text = data.username
|
||||
self.childAvatarImage.image = UIImage(named: "DefaultAvatar")
|
||||
if data.isSelected == true{
|
||||
ViewButtonAnimation.sharedInstance.cellTapped(view: self.outerView) { [weak self] in
|
||||
guard let self else{return}
|
||||
outerView.backgroundColor = #colorLiteral(red: 0.368627451, green: 0.1215686275, blue: 0.768627451, alpha: 1)
|
||||
childName.textColor = .white
|
||||
}
|
||||
|
||||
}else{
|
||||
outerView.backgroundColor = .white.withAlphaComponent(0.5)
|
||||
childName.textColor = UIColor.appColor(.TextDarkBlue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,5 +28,10 @@ extension K{
|
||||
static var reloadContinueKaraoke = false
|
||||
static var reloadContinueAudioBooks = false
|
||||
static var reloadContinueWebSeries = false
|
||||
|
||||
/*
|
||||
Username selected from forgot username shall be stored here
|
||||
*/
|
||||
static var selectedUsername : String? = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,16 @@ class ViewButtonAnimation {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@objc func cellTapped(view: UIView, completionHandler : @escaping () -> Void) {
|
||||
// Apply click effect animation
|
||||
UIView.animate(withDuration: 0.05, animations: {
|
||||
view.transform = CGAffineTransform(scaleX: 0.95, y: 0.95)
|
||||
}) { _ in
|
||||
UIView.animate(withDuration: 0.05) {
|
||||
view.transform = .identity
|
||||
completionHandler()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,14 @@ class SideMenuVM{
|
||||
weak var vc : SideMenuVC!
|
||||
|
||||
func initView(){
|
||||
|
||||
/*
|
||||
its put in ver 25.1.7 build 7 for testing purpose
|
||||
*/
|
||||
vc.appVersion.addTapGesture {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
AuthFunc.shareInstance.getDefaultLanguage() == .english ? (vc.languageControl.selectedSegmentIndex = 0) : (vc.languageControl.selectedSegmentIndex = 1)
|
||||
vc.appVersion.text = "VER: \(Bundle.main.appVersionLong) (\(Bundle.main.appBuild))"
|
||||
customizeSegmentControl()
|
||||
|
||||
@@ -82,7 +82,7 @@ class ThemeTwoVC: UIViewController{
|
||||
override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
vm.setData()
|
||||
if let playerLayer = vm.playerLayer{
|
||||
if vm.playerLayer != nil{
|
||||
vm.playerLayer.frame = liveTvView.bounds
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ class WebSeriesVC: UIViewController {
|
||||
noDataView.isHidden = true
|
||||
// for the first load always send hindi as it is default category
|
||||
vm.startShimmer()
|
||||
vm.checkAds()
|
||||
// showListingTableView.reloadData()
|
||||
vm.getShowListing(categoryID: 18)
|
||||
self.vm.getCategoryListing()
|
||||
|
||||
@@ -65,6 +65,10 @@ class WebSeriesVM{
|
||||
self.vc.expandBtn.setImage(UIImage(named: "SupportUpArrow"), for: .normal)
|
||||
}
|
||||
|
||||
checkAds()
|
||||
}
|
||||
|
||||
func checkAds(){
|
||||
/*
|
||||
MAke logic for ads
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user