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:
authorAleksey Belouosv <aleksey@maps.me>2019-10-02 15:12:43 +0300
committerAlexander Boriskov <polas.okurtis@gmail.com>2019-10-22 17:48:03 +0300
commit6febaa6072dcf0a4cb4bc0b6bdde1b3870c2c09d (patch)
treeb94417d93f95310cbea3be8b228000d79c16a55e /iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC
parent8e615cde35c81e327dea9662758f9e462c8f8bd0 (diff)
[iOS] move cpp wrappers to separate framework
Diffstat (limited to 'iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC')
-rw-r--r--iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift4
-rw-r--r--iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewTextCell.swift4
2 files changed, 6 insertions, 2 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 95980a621f..bc12813c7e 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewController.swift
@@ -1,7 +1,7 @@
@objc(MWMGCReviewSaver)
protocol UGCReviewSaver {
typealias onSaveHandler = (Bool) -> Void
- func saveUgc(model: UGCAddReviewController.Model, resultHandler: @escaping onSaveHandler)
+ func saveUgc(model: UGCAddReviewController.Model, language: String, resultHandler: @escaping onSaveHandler)
}
@objc(MWMUGCAddReviewController)
@@ -70,7 +70,7 @@ final class UGCAddReviewController: MWMTableViewController {
reviewPosted = true
model.text = text
- saver.saveUgc(model: model, resultHandler: { (saveResult) in
+ saver.saveUgc(model: model, language: textCell?.reviewLanguage ?? "en", resultHandler: { (saveResult) in
guard let nc = self.navigationController else { return }
if !saveResult {
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewTextCell.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewTextCell.swift
index 3853bf251e..fc42f710d7 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewTextCell.swift
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/UGCAddReview/UGCAddReviewTextCell.swift
@@ -16,6 +16,10 @@ final class UGCAddReviewTextCell: MWMTableViewCell {
get { return textView.text }
set { textView.text = newValue }
}
+
+ var reviewLanguage: String? {
+ get { return textView.textInputMode?.primaryLanguage }
+ }
}
extension UGCAddReviewTextCell: UITextViewDelegate {