Browse Source

Merge branch 'developer'

Conflicts:
	GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
pull/1/head
InKwon James Kim 5 years ago
parent
commit
b5b355f0b5
  1. 2
      GMERemittance/AppDelegate.swift
  2. 2
      GMERemittance/Info.plist
  3. 12
      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. 4
      GMERemittance/Module/PopupNotification/User Interface/Wireframe/PopupNotificationWireframe.swift
  7. 2
      GMERemittance/Utility/AppConstants.swift

2
GMERemittance/AppDelegate.swift

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

2
GMERemittance/Info.plist

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

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

@ -237,8 +237,6 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout {
presenter?.showPennyTest() presenter?.showPennyTest()
} }
private func update() {
let platform = self.user?.platforms ?? []
guard let ios = platform.filter({ $0.os ?? "" == "IOS"}).first else {return} guard let ios = platform.filter({ $0.os ?? "" == "IOS"}).first else {return}
let critical = ios.critical ?? "N" let critical = ios.critical ?? "N"
@ -777,7 +775,7 @@ extension HomeViewController {
} }
private func checkKFTCToken() { private func checkKFTCToken() {
if !isShowTokenRenewAlert {
if !UserDefaults.standard.bool(forKey: AppConstants.isOpenedTokenRenwalAlert) {
// TODO: Show Alert for token refresh (navigation push) // TODO: Show Alert for token refresh (navigation push)
guard guard
let remind = UserDefaults.standard.string(forKey: UserKeys.remindKFTCTokenDay), let remind = UserDefaults.standard.string(forKey: UserKeys.remindKFTCTokenDay),
@ -798,11 +796,11 @@ extension HomeViewController {
cancelTitle: "later_text".localized(), cancelTitle: "later_text".localized(),
okAction: { okAction: {
AutoDebitWireframe().pushMainView(on: self) AutoDebitWireframe().pushMainView(on: self)
self.isShowTokenRenewAlert = true
},
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedTokenRenwalAlert)
},
cancelAction : { cancelAction : {
self.isShowTokenRenewAlert = true
self.popUpNotification() self.popUpNotification()
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedTokenRenwalAlert)
} }
) )
} else { } else {
@ -812,8 +810,6 @@ extension HomeViewController {
} }
private func popUpNotification() { private func popUpNotification() {
self.isShowTokenRenewAlert = true
// FIXME: Temporary expire date // FIXME: Temporary expire date
let dateformat = DateFormatter() let dateformat = DateFormatter()
dateformat.dateFormat = "yyyy-MM-dd" 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.dateOfDontShowNotification)
store.removeObject(forKey: AppConstants.dateOfExpireNotification) store.removeObject(forKey: AppConstants.dateOfExpireNotification)
store.removeObject(forKey: AppConstants.isOpenedTokenRenwalAlert)
store.removeObject(forKey: AppConstants.isOpenedPopupNotification)
KeyChain.shared.save(data: "0", key: .login) 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 // MARK: IBActions
@IBAction func touchDontShowAgainTodayButton(_ sender: UIButton) { @IBAction func touchDontShowAgainTodayButton(_ sender: UIButton) {
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedPopupNotification)
// TODO: now . // TODO: now .
let now = Date() let now = Date()
UserDefaults.standard.set(now, forKey: AppConstants.dateOfDontShowNotification) UserDefaults.standard.set(now, forKey: AppConstants.dateOfDontShowNotification)
@ -39,6 +40,7 @@ class PopupNotificationViewController: UIViewController {
} }
@IBAction func touchOkButton(_ sender: UIButton) { @IBAction func touchOkButton(_ sender: UIButton) {
UserDefaults.standard.set(true, forKey: AppConstants.isOpenedPopupNotification)
dismiss(animated: true, completion: nil) dismiss(animated: true, completion: nil)
} }

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

@ -57,6 +57,8 @@ extension PopupNotificationWireframe: PopupNotificationWireframeInput {
UserDefaults.standard.removeObject(forKey: AppConstants.dateOfDontShowNotification) UserDefaults.standard.removeObject(forKey: AppConstants.dateOfDontShowNotification)
} }
source.present(getMainView(), animated: true, completion: nil)
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 accessTokenExpTime = "accessTokenExpTime"
static let dateOfDontShowNotification = "dateOfDontShowNotification" static let dateOfDontShowNotification = "dateOfDontShowNotification"
static let dateOfExpireNotification = "dateOfExpireNotification" static let dateOfExpireNotification = "dateOfExpireNotification"
static let isOpenedTokenRenwalAlert = "isOpenedTokenRenwalAlert"
static let isOpenedPopupNotification = "isOpenedPopupNotification"
} }
enum Devices { enum Devices {

Loading…
Cancel
Save