Browse Source

2.3.0(2) release

pull/1/head
InKwon James Kim 5 years ago
parent
commit
83910422a7
  1. 2
      GMERemittance/AppDelegate.swift
  2. 2
      GMERemittance/Info.plist
  3. 10
      GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
  4. 2
      GMERemittance/Module/Main/User Interface/Wireframe/MainWireframe.swift
  5. 2
      GMERemittance/Module/PopupNotification/User Interface/View/PopupNotificationViewController.swift
  6. 2
      GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift
  7. 2
      GMERemittance/Utility/AppConstants.swift

2
GMERemittance/AppDelegate.swift

@ -56,6 +56,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
setupNavBar()
setEntryPoint()
UserDefaults.standard.removeObject(forKey: AppConstants.isOpenedTokenRenwalAlert)
UserDefaults.standard.removeObject(forKey: AppConstants.isOpenedPopupNotification)
return true
}

2
GMERemittance/Info.plist

@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>

10
GMERemittance/Module/Home/User Interface/View/HomeViewController.swift

@ -83,8 +83,6 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout {
var userHotLine: HotLine?
var isShowTokenRenewAlert = false
override func viewDidLoad() {
super.viewDidLoad()
// test()
@ -772,7 +770,7 @@ extension HomeViewController {
}
private func checkKFTCToken() {
if !isShowTokenRenewAlert {
if !UserDefaults.standard.bool(forKey: AppConstants.isOpenedTokenRenwalAlert) {
// TODO: Show Alert for token refresh (navigation push)
guard
let remind = UserDefaults.standard.string(forKey: UserKeys.remindKFTCTokenDay),
@ -793,11 +791,11 @@ extension HomeViewController {
cancelTitle: "later_text".localized(),
okAction: {
AutoDebitWireframe().pushMainView(on: self)
self.isShowTokenRenewAlert = true
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedTokenRenwalAlert)
},
cancelAction : {
self.isShowTokenRenewAlert = true
self.popUpNotification()
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedTokenRenwalAlert)
}
)
} else {
@ -807,8 +805,6 @@ extension HomeViewController {
}
private func popUpNotification() {
self.isShowTokenRenewAlert = true
// FIXME: Temporary expire date
let dateformat = DateFormatter()
dateformat.dateFormat = "yyyy-MM-dd"

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

@ -97,6 +97,8 @@ extension MainWireframe: MainWireframeInput {
store.removeObject(forKey: AppConstants.dateOfDontShowNotification)
store.removeObject(forKey: AppConstants.dateOfExpireNotification)
store.removeObject(forKey: AppConstants.isOpenedTokenRenwalAlert)
store.removeObject(forKey: AppConstants.isOpenedPopupNotification)
KeyChain.shared.save(data: "0", key: .login)

2
GMERemittance/Module/PopupNotification/User Interface/View/PopupNotificationViewController.swift

@ -32,6 +32,7 @@ class PopupNotificationViewController: UIViewController {
// MARK: IBActions
@IBAction func touchDontShowAgainTodayButton(_ sender: UIButton) {
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedPopupNotification)
// TODO: now .
let now = Date()
UserDefaults.standard.set(now, forKey: AppConstants.dateOfDontShowNotification)
@ -39,6 +40,7 @@ class PopupNotificationViewController: UIViewController {
}
@IBAction func touchOkButton(_ sender: UIButton) {
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedPopupNotification)
dismiss(animated: true, completion: nil)
}

2
GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift

@ -57,6 +57,8 @@ extension PopupNotificationWireframe: PopupNotificationWireframeInput {
UserDefaults.standard.removeObject(forKey: AppConstants.dateOfDontShowNotification)
}
if !UserDefaults.standard.bool(forKey: AppConstants.isOpenedPopupNotification) {
source.present(getMainView(), animated: true, completion: nil)
}
}
}

2
GMERemittance/Utility/AppConstants.swift

@ -35,6 +35,8 @@ class AppConstants {
static let accessTokenExpTime = "accessTokenExpTime"
static let dateOfDontShowNotification = "dateOfDontShowNotification"
static let dateOfExpireNotification = "dateOfExpireNotification"
static let isOpenedTokenRenwalAlert = "isOpenedTokenRenwalAlert"
static let isOpenedPopupNotification = "isOpenedPopupNotification"
}
enum Devices {

Loading…
Cancel
Save