|
@ -106,10 +106,13 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing |
|
|
|
|
|
|
|
|
editedIndex = nil |
|
|
editedIndex = nil |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setUpAnotherLoginListener(genericviewmodel: socialfeedviewmodel) |
|
|
// setUpAnotherLoginListener(genericviewmodel: socialfeedviewmodel) |
|
|
setUpAnotherLoginListener(genericviewmodel: profileViewModel) |
|
|
setUpAnotherLoginListener(genericviewmodel: profileViewModel) |
|
|
// setUpNetworkListener() |
|
|
// setUpNetworkListener() |
|
|
super.viewWillAppear(true) |
|
|
super.viewWillAppear(true) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.tabBarController?.tabBar.isHidden = false |
|
|
self.tabBarController?.tabBar.isHidden = false |
|
|
setNavBar() |
|
|
setNavBar() |
|
|
setActionBarIcons(showNotificationParameter: false) |
|
|
setActionBarIcons(showNotificationParameter: false) |
|
@ -160,7 +163,7 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func isVerifiedUser() -> Bool { |
|
|
func isVerifiedUser() -> Bool { |
|
|
return UserDefaults.standard.object(forKey: "com.gmeremit.isVerified") as! Bool |
|
|
|
|
|
|
|
|
return (UserDefaults.standard.object(forKey: UserKeys.verified) as? Bool ) ?? false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -325,6 +328,11 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing |
|
|
hideKeyboardWhenTappedAround() |
|
|
hideKeyboardWhenTappedAround() |
|
|
setUpRefreshControl() |
|
|
setUpRefreshControl() |
|
|
|
|
|
|
|
|
|
|
|
if isVerifiedUser() { |
|
|
|
|
|
self.alert(message: "Your document is in verification process. Thereafter you can enjoy GME online service. Thank you for registering with us!.") |
|
|
|
|
|
// cell.btnAgnet.addTarget(self, action:#selector(agentTap(_:)), for:.touchUpInside) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if numberCellsInCollectionView == nil { |
|
|
if numberCellsInCollectionView == nil { |
|
|
numberCellsInCollectionView = 4 |
|
|
numberCellsInCollectionView = 4 |
|
|
} |
|
|
} |
|
@ -1085,7 +1093,6 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource { |
|
|
case .balance: |
|
|
case .balance: |
|
|
|
|
|
|
|
|
cell = tableView.dequeueReusableCell(withIdentifier: "topCell", for: indexPath) as! TableViewCell |
|
|
cell = tableView.dequeueReusableCell(withIdentifier: "topCell", for: indexPath) as! TableViewCell |
|
|
if isVerifiedUser() { |
|
|
|
|
|
cell.viewTop.alpha = 1 |
|
|
cell.viewTop.alpha = 1 |
|
|
cell.btnRewardPoint.setTitle(UserDefaults.standard.object(forKey: "com.gmeremit.rewardPoint") as? String, for: .normal) |
|
|
cell.btnRewardPoint.setTitle(UserDefaults.standard.object(forKey: "com.gmeremit.rewardPoint") as? String, for: .normal) |
|
|
cell.btnRewardPoint.addTarget(self, action:#selector(rewardTap(_:)), for:.touchUpInside) |
|
|
cell.btnRewardPoint.addTarget(self, action:#selector(rewardTap(_:)), for:.touchUpInside) |
|
@ -1096,16 +1103,7 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource { |
|
|
if let firstName = nameArray.first { |
|
|
if let firstName = nameArray.first { |
|
|
cell.labelUsername.text = String(firstName) |
|
|
cell.labelUsername.text = String(firstName) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
cell.labelUsername.text = nickName |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
self.alert(message: "Your document is in verification process. Thereafter you can enjoy GME online service. Thank you for registering with us!.") |
|
|
|
|
|
cell.btnAgnet.addTarget(self, action:#selector(agentTap(_:)), for:.touchUpInside) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return cell |
|
|
return cell |
|
|
|
|
|
|
|
|
case .collection: |
|
|
case .collection: |
|
|