forked from organicmaps/organicmaps
[ios] Fixed google auth
This commit is contained in:
parent
6af5083d1b
commit
853c1cd3dc
1 changed files with 7 additions and 4 deletions
|
@ -62,11 +62,14 @@ final class UGCAddReviewController: MWMTableViewController {
|
|||
model.text = text
|
||||
onSave(model)
|
||||
guard let nc = navigationController else { return }
|
||||
if MWMPlatform.networkConnectionType() == .none {
|
||||
if MWMAuthorizationViewModel.isAuthenticated() || MWMPlatform.networkConnectionType() == .none {
|
||||
nc.popViewController(animated: true)
|
||||
return
|
||||
}
|
||||
|
||||
if MWMAuthorizationViewModel.hasSocialToken() {
|
||||
MWMAuthorizationViewModel.checkAuthentication(with: .UGC, onComplete: { _ in})
|
||||
nc.popViewController(animated: true)
|
||||
} else if MWMAuthorizationViewModel.hasSocialToken() {
|
||||
MWMAuthorizationViewModel.checkAuthentication(with: .UGC, onComplete: { _ in })
|
||||
nc.popToRootViewController(animated: true)
|
||||
} else {
|
||||
Statistics.logEvent(kStatUGCReviewAuthShown, withParameters: [kStatFrom: kStatAfterSave])
|
||||
let authVC = AuthorizationViewController(barButtonItem: navigationItem.rightBarButtonItem!,
|
||||
|
|
Loading…
Add table
Reference in a new issue