Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@gmail.com>2017-11-10 15:32:02 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2017-11-10 23:03:02 +0300
commitb8719d4ff0aded53a8cb0606b33262a9cf5c3fe4 (patch)
treeb676e1358fef36466e0f332ddefb7c20f6907ce1 /iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC
parentdb4c3616fd810855b65bdaf9930765dbfca8cdb7 (diff)
[MAPSME-5886] [ios] Added network policy check to authorization.
Diffstat (limited to 'iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC')
-rw-r--r--iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift14
1 files changed, 7 insertions, 7 deletions
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift
index 7106c07160..5ba2cc4799 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift
@@ -19,7 +19,7 @@ final class UGCAddReviewController: MWMTableViewController {
private var model: Model! {
didSet {
sections = []
- assert(!model.ratings.isEmpty);
+ assert(!model.ratings.isEmpty)
sections.append(.ratings)
sections.append(.text)
}
@@ -36,7 +36,7 @@ final class UGCAddReviewController: MWMTableViewController {
override func backTap() {
guard let nc = navigationController else { return }
- Statistics.logEvent(kStatUGCReviewCancel);
+ Statistics.logEvent(kStatUGCReviewCancel)
nc.popToRootViewController(animated: true)
}
@@ -55,20 +55,20 @@ final class UGCAddReviewController: MWMTableViewController {
@objc private func onDone() {
guard let text = textCell?.reviewText else {
- assert(false);
+ assert(false)
return
}
Statistics.logEvent(kStatUGCReviewSuccess)
model.text = text
onSave(model)
guard let nc = navigationController else { return }
- if MWMAuthorizationViewModel.isAuthenticated() {
+ if MWMPlatform.networkConnectionType() == .none || MWMAuthorizationViewModel.isAuthenticated() {
nc.popViewController(animated: true)
} else {
- Statistics.logEvent(kStatUGCReviewAuthShown, withParameters: [kStatFrom : kStatAfterSave])
+ Statistics.logEvent(kStatUGCReviewAuthShown, withParameters: [kStatFrom: kStatAfterSave])
let authVC = AuthorizationViewController(barButtonItem: navigationItem.rightBarButtonItem!,
completion: { nc.popToRootViewController(animated: true) })
- present(authVC, animated: true, completion: nil);
+ present(authVC, animated: true, completion: nil)
}
}
@@ -92,7 +92,7 @@ final class UGCAddReviewController: MWMTableViewController {
case .text:
let cell = tableView.dequeueReusableCell(withCellClass: UGCAddReviewTextCell.self, indexPath: indexPath) as! UGCAddReviewTextCell
cell.reviewText = model.text
- textCell = cell;
+ textCell = cell
return cell
}
}