diff options
author | Aleksey Belouosv <aleksey@maps.me> | 2018-07-06 14:36:09 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-07-20 14:51:41 +0300 |
commit | 123e15e5aa408704dea6a7878cd03ded0c4c55db (patch) | |
tree | 9070375c690dc0a0dc3a5ca3c9d6fda0da076abd /iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC | |
parent | ed9828caf7b604da6c31a89bf507c71813e56dde (diff) |
[iOS] enable interactive pop gesture (swipe back)
Diffstat (limited to 'iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC')
-rw-r--r-- | iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift | 11 |
1 files changed, 7 insertions, 4 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 6a09c850ab..a33e1199ff 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift @@ -3,6 +3,7 @@ final class UGCAddReviewController: MWMTableViewController { typealias Model = UGCReviewModel weak var textCell: UGCAddReviewTextCell? + var reviewPosted = false enum Sections { case ratings @@ -34,10 +35,11 @@ final class UGCAddReviewController: MWMTableViewController { configTableView() } - override func backTap() { - guard let nc = navigationController else { return } - Statistics.logEvent(kStatUGCReviewCancel) - nc.popToRootViewController(animated: true) + override func viewDidDisappear(_ animated: Bool) { + super.viewDidDisappear(animated) + if isMovingFromParentViewController && !reviewPosted { + Statistics.logEvent(kStatUGCReviewCancel) + } } private func configNavBar() { @@ -59,6 +61,7 @@ final class UGCAddReviewController: MWMTableViewController { return } Statistics.logEvent(kStatUGCReviewSuccess) + reviewPosted = true model.text = text onSave(model) guard let nc = navigationController else { return } |