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:
authorVlad Mihaylenko <vxmihaylenko@gmail.com>2017-09-26 17:20:02 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2017-09-26 17:20:02 +0300
commit232f82675a2fee9c6f8c69c57b257a5b2c61f01e (patch)
tree16b9a016fca1bf73becf33e61859888349b838f8 /iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC
parent63f43305c6dac4900ced825fa484a56454bbfc41 (diff)
[dnm] Refactored ugc structure (#7136)
* Refactored ugc structure and connected it with UI. * Fixed iOS compilation. * [android] Fixed android build compilation * Round rating.
Diffstat (limited to 'iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC')
-rw-r--r--iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/MWMUGCReviewVM.mm19
1 files changed, 6 insertions, 13 deletions
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/MWMUGCReviewVM.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/MWMUGCReviewVM.mm
index 50cbdbe34a..a8cf52fbcd 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/MWMUGCReviewVM.mm
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/UGC/MWMUGCReviewVM.mm
@@ -34,31 +34,25 @@
- (void)config
{
- auto & records = m_ugc.m_ratings.m_ratings;
-// Uncomment for testing.
- records.emplace_back("Price", 0);
- records.emplace_back("Place", 0);
-
- m_rows.insert(m_rows.begin(), records.size(), ugc_review::Row::Detail);
- m_rows.emplace_back(ugc_review::Row::Message);
+ // TODO: Config controller with ugc.
}
- (void)setDefaultStarCount:(NSInteger)starCount
{
- for (auto & r : m_ugc.m_ratings.m_ratings)
- r.m_value = starCount;
+ // TODO: Set stars count.
}
- (void)submit
{
- GetFramework().GetUGCApi().SetUGCUpdate(m_fid, m_ugc);
+ GetFramework().GetUGCApi()->SetUGCUpdate(m_fid, m_ugc);
}
- (NSInteger)numberOfRows { return m_rows.size(); }
- (ugc::RatingRecord const &)recordForIndexPath:(NSIndexPath *)indexPath
{
- return m_ugc.m_ratings.m_ratings[indexPath.row];
+ // TODO: Return rating record from ugc.
+ return ugc::RatingRecord();
}
- (ugc_review::Row)rowForIndexPath:(NSIndexPath *)indexPath { return m_rows[indexPath.row]; }
@@ -67,8 +61,7 @@
- (void)changeReviewRate:(NSInteger)rate atIndexPath:(NSIndexPath *)indexPath
{
- auto & record = m_ugc.m_ratings.m_ratings[indexPath.row];
- record.m_value = rate;
+ //TODO: Change review rate.
}
#pragma mark - MWMUGCTextReviewDelegate