|
@@ -73,6 +73,10 @@ class AccountCenterWindowController: NSWindowController {
|
|
|
if success == false {
|
|
|
AccountManager.manager.isLogin = false
|
|
|
|
|
|
+ if dataModel?.code == KMHttpReponseCode.passwordChanged.rawValue {
|
|
|
+ self._showHud(msg: NSLocalizedString("Your password has been changed. Please login again.", comment: ""))
|
|
|
+ }
|
|
|
+
|
|
|
NotificationCenter.default.post(name: .loginStatusChanged, object: nil)
|
|
|
self.gotoLogin()
|
|
|
return
|
|
@@ -132,6 +136,10 @@ class AccountCenterWindowController: NSWindowController {
|
|
|
if success == false {
|
|
|
AccountManager.manager.isLogin = false
|
|
|
|
|
|
+ if dataModel?.code == KMHttpReponseCode.passwordChanged.rawValue {
|
|
|
+ self._showHud(msg: NSLocalizedString("Your password has been changed. Please login again.", comment: ""))
|
|
|
+ }
|
|
|
+
|
|
|
NotificationCenter.default.post(name: .loginStatusChanged, object: nil)
|
|
|
return
|
|
|
}
|
|
@@ -183,6 +191,10 @@ class AccountCenterWindowController: NSWindowController {
|
|
|
if success == false {
|
|
|
AccountManager.manager.isLogin = false
|
|
|
|
|
|
+ if dataModel?.code == KMHttpReponseCode.passwordChanged.rawValue {
|
|
|
+ self._showHud(msg: NSLocalizedString("Your password has been changed. Please login again.", comment: ""))
|
|
|
+ }
|
|
|
+
|
|
|
NotificationCenter.default.post(name: .loginStatusChanged, object: nil)
|
|
|
return
|
|
|
}
|
|
@@ -274,9 +286,10 @@ class AccountCenterWindowController: NSWindowController {
|
|
|
}
|
|
|
|
|
|
private func _showHud(msg: String) {
|
|
|
- if let data = self.window?.contentView {
|
|
|
-// _ = CustomAlertView(message: msg, from: data, with: .black)
|
|
|
- CustomAlertView.alertView(message: msg, fromView: data, withStyle: .black)
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ if let data = self.window?.contentView {
|
|
|
+ _ = CustomAlertView.alertView(message: msg, fromView: data, withStyle: .black)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|