Browse Source

crash fixed in dashboard

pull/1/head
gme_2 6 years ago
parent
commit
75c3604068
  1. 8
      GMERemittance/Home/Home.storyboard
  2. 20
      GMERemittance/Home/HomeViewController.swift
  3. 1
      GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift

8
GMERemittance/Home/Home.storyboard

@ -254,8 +254,8 @@
<constraint firstAttribute="height" constant="2" id="WSf-Db-AbZ"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Kapil" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s0L-mA-dZF">
<rect key="frame" x="67" y="75" width="29.5" height="14"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="user" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s0L-mA-dZF">
<rect key="frame" x="67" y="75" width="26" height="14"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -1111,10 +1111,10 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8WZ-lQ-Im6" userLabel="LoadMoreView">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44.5"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7wo-T4-XhL">
<rect key="frame" x="155.5" y="7.5" width="63" height="29"/>
<rect key="frame" x="155.5" y="8" width="63" height="29"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<state key="normal" title="Load More"/>
<connections>

20
GMERemittance/Home/HomeViewController.swift

@ -106,10 +106,13 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
editedIndex = nil
// setUpAnotherLoginListener(genericviewmodel: socialfeedviewmodel)
setUpAnotherLoginListener(genericviewmodel: profileViewModel)
// setUpNetworkListener()
super.viewWillAppear(true)
self.tabBarController?.tabBar.isHidden = false
setNavBar()
setActionBarIcons(showNotificationParameter: false)
@ -160,7 +163,7 @@ class HomeViewController: UIViewController, TableViewCellDelegate, FBSDKSharing
}
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()
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 {
numberCellsInCollectionView = 4
}
@ -1085,7 +1093,6 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource {
case .balance:
cell = tableView.dequeueReusableCell(withIdentifier: "topCell", for: indexPath) as! TableViewCell
if isVerifiedUser() {
cell.viewTop.alpha = 1
cell.btnRewardPoint.setTitle(UserDefaults.standard.object(forKey: "com.gmeremit.rewardPoint") as? String, for: .normal)
cell.btnRewardPoint.addTarget(self, action:#selector(rewardTap(_:)), for:.touchUpInside)
@ -1096,16 +1103,7 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource {
if let firstName = nameArray.first {
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
case .collection:

1
GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift

@ -64,7 +64,6 @@ extension MainWireframe: MainWireframeInput {
static func logout() {
guard let window = MainWireframe.shared?.window else {return}
MainWireframe.shared = nil
let splaseWireframe = SplashScreenWireframe()
let nav = UINavigationController.init(rootViewController: splaseWireframe.getMainView())
window.rootViewController = nav

Loading…
Cancel
Save