[iOS] [refactoring] remove old files

This commit is contained in:
Aleksey Belouosv 2020-01-08 11:31:36 +03:00 committed by Alexander Boriskov
parent db09944606
commit d0e9f80a4e
21 changed files with 4 additions and 1003 deletions

View file

@ -50,7 +50,6 @@
#import "MWMNoMapsViewController.h"
#import "MWMPlacePageManagerHelper.h"
#import "MWMPushNotifications.h"
#import "MWMReviewsViewModelProtocol.h"
#import "MWMRouteManagerPointType.h"
#import "MWMRoutePreviewTaxiCellType.h"
#import "MWMRouter.h"

View file

@ -87,14 +87,11 @@
342639361EA0E60A0025EB89 /* local_ads_symbols.txt in Resources */ = {isa = PBXBuildFile; fileRef = 450703081E9E6CF000E8C029 /* local_ads_symbols.txt */; };
342CC5F21C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342CC5F01C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm */; };
342EE4121C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342EE4101C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm */; };
3430291D1F87BF4400D0A07C /* ReviewsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430291A1F87BC3000D0A07C /* ReviewsViewController.swift */; };
343064411E9FDC7300DC7665 /* SearchIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430643F1E9FDC7300DC7665 /* SearchIndex.swift */; };
343E75981E5B1EE20041226A /* MWMCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 343E75961E5B1EE20041226A /* MWMCollectionViewController.m */; };
3444DFCD1F1760B900E73099 /* WidgetsArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3444DFCB1F1760B900E73099 /* WidgetsArea.swift */; };
3444DFD21F17620C00E73099 /* MWMMapWidgetsHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3444DFD01F17620C00E73099 /* MWMMapWidgetsHelper.mm */; };
3444DFDE1F18A5AF00E73099 /* SideButtonsArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3444DFDC1F18A5AF00E73099 /* SideButtonsArea.swift */; };
344532311F6FE5880059FBCC /* UGCSummaryRatingStarsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3445322E1F6FE5880059FBCC /* UGCSummaryRatingStarsCell.swift */; };
344532341F6FE5880059FBCC /* UGCSummaryRatingStarsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3445322F1F6FE5880059FBCC /* UGCSummaryRatingStarsCell.xib */; };
344532381F6FFE6A0059FBCC /* UGCRating.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344532361F6FFE6A0059FBCC /* UGCRating.swift */; };
3445324E1F714FD70059FBCC /* UGCAddReviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3445324B1F714FD70059FBCC /* UGCAddReviewController.swift */; };
344532511F714FD70059FBCC /* UGCAddReviewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3445324C1F714FD70059FBCC /* UGCAddReviewController.xib */; };
@ -117,7 +114,6 @@
3454D7E31E07F045004AF2AD /* UITextView+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.m */; };
34574A671E3B85F80061E839 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34574A651E3B85F80061E839 /* ThemeManager.swift */; };
3457C4261F680F1900028233 /* String+BoundingRect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3457C4241F680F1900028233 /* String+BoundingRect.swift */; };
345C2F8A1F86361B009DB8B4 /* MWMUGCViewModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345C2F881F86361B009DB8B4 /* MWMUGCViewModel.mm */; };
345E8F4E1F83984500A826CC /* GoogleSignIn.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 347D15C71F82362900E86251 /* GoogleSignIn.framework */; };
345E8F4F1F83984500A826CC /* GoogleSignInDependencies.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 347D15C81F82362900E86251 /* GoogleSignInDependencies.framework */; };
345E8F551F839E6C00A826CC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 345E8F4D1F83976800A826CC /* GoogleService-Info.plist */; };
@ -165,8 +161,6 @@
348A8DF81F66775A00D83026 /* RatingViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348A8DF21F66775A00D83026 /* RatingViewDelegate.swift */; };
348A8DFB1F66775A00D83026 /* RatingViewSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348A8DF31F66775A00D83026 /* RatingViewSettings.swift */; };
348B926D1FF3B5E100379009 /* UIView+Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348B926B1FF3B5E100379009 /* UIView+Animation.swift */; };
348F8A4F1F863A8500060C2A /* UGCYourReview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348F8A4D1F863A8500060C2A /* UGCYourReview.swift */; };
348F8A531F863B6100060C2A /* UGCReview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348F8A511F863B6100060C2A /* UGCReview.swift */; };
3490D2DF1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */; };
3490D2E11CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DC1CE9DD2500D0B838 /* MWMSideButtonsView.mm */; };
3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */; };
@ -282,12 +276,6 @@
34D3B0481E389D05004100F9 /* MWMNoteCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0151E389D05004100F9 /* MWMNoteCell.m */; };
34D3B04B1E389D05004100F9 /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0161E389D05004100F9 /* MWMNoteCell.xib */; };
34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; };
34E50DD81F6FCAB1008EED49 /* UGCSummaryRatingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E50DD51F6FCAB1008EED49 /* UGCSummaryRatingCell.swift */; };
34E50DDB1F6FCAB1008EED49 /* UGCSummaryRatingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34E50DD61F6FCAB1008EED49 /* UGCSummaryRatingCell.xib */; };
34E50DF01F6FCC41008EED49 /* UGCYourReviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E50DED1F6FCC41008EED49 /* UGCYourReviewCell.swift */; };
34E50DF31F6FCC41008EED49 /* UGCYourReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34E50DEE1F6FCC41008EED49 /* UGCYourReviewCell.xib */; };
34E50DF81F6FCC96008EED49 /* UGCReviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E50DF51F6FCC96008EED49 /* UGCReviewCell.swift */; };
34E50DFB1F6FCC96008EED49 /* UGCReviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34E50DF61F6FCC96008EED49 /* UGCReviewCell.xib */; };
34E6F2DB1F459C05008E14F9 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34E6F2DA1F459C05008E14F9 /* GLKit.framework */; };
34E776101F14B165003040B3 /* VisibleArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E7760E1F14B165003040B3 /* VisibleArea.swift */; };
34E776141F14B17F003040B3 /* AvailableArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E776121F14B17F003040B3 /* AvailableArea.swift */; };
@ -756,7 +744,6 @@
F6A2184A1CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A218481CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm */; };
F6BD1D211CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD1D1F1CA412920047B8E8 /* MWMOsmAuthAlert.mm */; };
F6BD1D241CA412E40047B8E8 /* MWMOsmAuthAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6BD1D221CA412E30047B8E8 /* MWMOsmAuthAlert.xib */; };
F6C16A671F9626B2000FE296 /* ReviewsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3430291B1F87BC3000D0A07C /* ReviewsViewController.xib */; };
F6C3A1B221AC22810060EEC8 /* Alert 5.m4a in Resources */ = {isa = PBXBuildFile; fileRef = F6C3A1B121AC22810060EEC8 /* Alert 5.m4a */; };
F6D67CDC2062B9C00032FD38 /* BCCreateCategoryAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6D67CDB2062B9C00032FD38 /* BCCreateCategoryAlert.swift */; };
F6D67CDE2062BBA60032FD38 /* MWMBCCreateCategoryAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6D67CDD2062BBA60032FD38 /* MWMBCCreateCategoryAlert.xib */; };
@ -1005,8 +992,6 @@
342CC5F01C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAuthorizationLoginViewController.mm; sourceTree = "<group>"; };
342EE40F1C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAuthorizationWebViewLoginViewController.h; sourceTree = "<group>"; };
342EE4101C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAuthorizationWebViewLoginViewController.mm; sourceTree = "<group>"; };
3430291A1F87BC3000D0A07C /* ReviewsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewsViewController.swift; sourceTree = "<group>"; };
3430291B1F87BC3000D0A07C /* ReviewsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReviewsViewController.xib; sourceTree = "<group>"; };
3430643F1E9FDC7300DC7665 /* SearchIndex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchIndex.swift; sourceTree = "<group>"; };
343E75951E5B1EE20041226A /* MWMCollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMCollectionViewController.h; sourceTree = "<group>"; };
343E75961E5B1EE20041226A /* MWMCollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMCollectionViewController.m; sourceTree = "<group>"; };
@ -1014,8 +999,6 @@
3444DFCF1F17620C00E73099 /* MWMMapWidgetsHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapWidgetsHelper.h; sourceTree = "<group>"; };
3444DFD01F17620C00E73099 /* MWMMapWidgetsHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapWidgetsHelper.mm; sourceTree = "<group>"; };
3444DFDC1F18A5AF00E73099 /* SideButtonsArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideButtonsArea.swift; sourceTree = "<group>"; };
3445322E1F6FE5880059FBCC /* UGCSummaryRatingStarsCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCSummaryRatingStarsCell.swift; sourceTree = "<group>"; };
3445322F1F6FE5880059FBCC /* UGCSummaryRatingStarsCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UGCSummaryRatingStarsCell.xib; sourceTree = "<group>"; };
344532361F6FFE6A0059FBCC /* UGCRating.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCRating.swift; sourceTree = "<group>"; };
3445324B1F714FD70059FBCC /* UGCAddReviewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCAddReviewController.swift; sourceTree = "<group>"; };
3445324C1F714FD70059FBCC /* UGCAddReviewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UGCAddReviewController.xib; sourceTree = "<group>"; };
@ -1051,8 +1034,6 @@
34570A3A1B13222600E6D4FD /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
34574A651E3B85F80061E839 /* ThemeManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThemeManager.swift; sourceTree = "<group>"; };
3457C4241F680F1900028233 /* String+BoundingRect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+BoundingRect.swift"; sourceTree = "<group>"; };
345C2F871F86361B009DB8B4 /* MWMUGCViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMUGCViewModel.h; sourceTree = "<group>"; };
345C2F881F86361B009DB8B4 /* MWMUGCViewModel.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMUGCViewModel.mm; sourceTree = "<group>"; };
345E8F4D1F83976800A826CC /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3462258C1DDC5DB9001E8752 /* MWMSearchNoResultsAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchNoResultsAlert.h; sourceTree = "<group>"; };
3462258D1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchNoResultsAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
@ -1117,8 +1098,6 @@
348A8DF21F66775A00D83026 /* RatingViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RatingViewDelegate.swift; sourceTree = "<group>"; };
348A8DF31F66775A00D83026 /* RatingViewSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RatingViewSettings.swift; sourceTree = "<group>"; };
348B926B1FF3B5E100379009 /* UIView+Animation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Animation.swift"; sourceTree = "<group>"; };
348F8A4D1F863A8500060C2A /* UGCYourReview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UGCYourReview.swift; sourceTree = "<group>"; };
348F8A511F863B6100060C2A /* UGCReview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UGCReview.swift; sourceTree = "<group>"; };
3490D2D91CE9DD2500D0B838 /* MWMSideButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtons.h; sourceTree = "<group>"; };
3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSideButtons.mm; sourceTree = "<group>"; };
3490D2DB1CE9DD2500D0B838 /* MWMSideButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtonsView.h; sourceTree = "<group>"; };
@ -1288,14 +1267,6 @@
34D3B0161E389D05004100F9 /* MWMNoteCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMNoteCell.xib; sourceTree = "<group>"; };
34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Init.swift"; sourceTree = "<group>"; };
34D7DB77204ED3DD0041D015 /* maps.me dbg.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "maps.me dbg.entitlements"; sourceTree = "<group>"; };
34DFCD971F87ED2400AE2672 /* MWMReviewsViewModelProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMReviewsViewModelProtocol.h; sourceTree = "<group>"; };
34DFCD981F87ED5600AE2672 /* MWMReviewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMReviewProtocol.h; sourceTree = "<group>"; };
34E50DD51F6FCAB1008EED49 /* UGCSummaryRatingCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCSummaryRatingCell.swift; sourceTree = "<group>"; };
34E50DD61F6FCAB1008EED49 /* UGCSummaryRatingCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UGCSummaryRatingCell.xib; sourceTree = "<group>"; };
34E50DED1F6FCC41008EED49 /* UGCYourReviewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCYourReviewCell.swift; sourceTree = "<group>"; };
34E50DEE1F6FCC41008EED49 /* UGCYourReviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UGCYourReviewCell.xib; sourceTree = "<group>"; };
34E50DF51F6FCC96008EED49 /* UGCReviewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCReviewCell.swift; sourceTree = "<group>"; };
34E50DF61F6FCC96008EED49 /* UGCReviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UGCReviewCell.xib; sourceTree = "<group>"; };
34E6F2DA1F459C05008E14F9 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
34E7270820444A7A009E4CED /* MWMAlertViewController+CPP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MWMAlertViewController+CPP.h"; sourceTree = "<group>"; };
34E7270920444B95009E4CED /* MWMAlert+CPP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MWMAlert+CPP.h"; sourceTree = "<group>"; };
@ -2641,17 +2612,6 @@
path = Storyboard;
sourceTree = "<group>";
};
343029191F87BBF300D0A07C /* Reviews */ = {
isa = PBXGroup;
children = (
3430291A1F87BC3000D0A07C /* ReviewsViewController.swift */,
3430291B1F87BC3000D0A07C /* ReviewsViewController.xib */,
34DFCD971F87ED2400AE2672 /* MWMReviewsViewModelProtocol.h */,
34DFCD981F87ED5600AE2672 /* MWMReviewProtocol.h */,
);
path = Reviews;
sourceTree = "<group>";
};
3432E17F1E49BEFA008477E9 /* Ads */ = {
isa = PBXGroup;
children = (
@ -3339,13 +3299,12 @@
path = RB;
sourceTree = "<group>";
};
34F4B0641F6AC6890035F4F3 /* UGCViewModel */ = {
34F407591E9E1D7A00E57AC0 /* Products */ = {
isa = PBXGroup;
children = (
345C2F871F86361B009DB8B4 /* MWMUGCViewModel.h */,
345C2F881F86361B009DB8B4 /* MWMUGCViewModel.mm */,
34F4075D1E9E1D7A00E57AC0 /* libMopub.a */,
);
path = UGCViewModel;
name = Products;
sourceTree = "<group>";
};
34F73F5E1E082FF700AC1FD6 /* LocalizedStrings */ = {
@ -4205,16 +4164,6 @@
children = (
3445324A1F714FD70059FBCC /* UGCAddReview */,
344532361F6FFE6A0059FBCC /* UGCRating.swift */,
348F8A511F863B6100060C2A /* UGCReview.swift */,
34E50DF51F6FCC96008EED49 /* UGCReviewCell.swift */,
34E50DF61F6FCC96008EED49 /* UGCReviewCell.xib */,
34E50DD51F6FCAB1008EED49 /* UGCSummaryRatingCell.swift */,
34E50DD61F6FCAB1008EED49 /* UGCSummaryRatingCell.xib */,
3445322E1F6FE5880059FBCC /* UGCSummaryRatingStarsCell.swift */,
3445322F1F6FE5880059FBCC /* UGCSummaryRatingStarsCell.xib */,
348F8A4D1F863A8500060C2A /* UGCYourReview.swift */,
34E50DED1F6FCC41008EED49 /* UGCYourReviewCell.swift */,
34E50DEE1F6FCC41008EED49 /* UGCYourReviewCell.xib */,
);
path = UGC;
sourceTree = "<group>";
@ -4273,7 +4222,6 @@
F6E2FC321E097B9F0083EBEC /* Editor */,
F6E2FC8F1E097B9F0083EBEC /* PlacePage */,
3DB1C56F22D5DCF20097EC4C /* Promo */,
343029191F87BBF300D0A07C /* Reviews */,
F6E2FCE11E097B9F0083EBEC /* Search */,
F6E2FD361E097BA00083EBEC /* Settings */,
340E1EE31E2F614400CE49BF /* Storyboard */,
@ -4455,7 +4403,6 @@
F6E2FC8F1E097B9F0083EBEC /* PlacePage */ = {
isa = PBXGroup;
children = (
34F4B0641F6AC6890035F4F3 /* UGCViewModel */,
F6E2FC931E097B9F0083EBEC /* DirectionView */,
F6E2FC991E097B9F0083EBEC /* MWMPlacePageManager.h */,
F6E2FC9A1E097B9F0083EBEC /* MWMPlacePageManager.mm */,
@ -4920,7 +4867,7 @@
F6C3A1B221AC22810060EEC8 /* Alert 5.m4a in Resources */,
4560F585213D53C100CC736C /* shaders_metal.metallib in Resources */,
F642D1231F0F9D1D005E3C25 /* ugc_types.csv in Resources */,
34E50DFB1F6FCC96008EED49 /* UGCReviewCell.xib in Resources */,
3495433D1EB22D9600F08F73 /* MPAdBrowserController.xib in Resources */,
6741A9531BF340DE002C974C /* 01_dejavusans.ttf in Resources */,
6741A9541BF340DE002C974C /* 02_droidsans-fallback.ttf in Resources */,
479D305B22C62F4000D18278 /* MWMBookmarksBannerViewController.xib in Resources */,
@ -4986,7 +4933,6 @@
34D3B0241E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */,
34AB667A1FC5AA330078E451 /* RoutePreviewTaxiCell.xib in Resources */,
34D3B0271E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.xib in Resources */,
34E50DDB1F6FCAB1008EED49 /* UGCSummaryRatingCell.xib in Resources */,
47B505542136B0C2009CBB55 /* DiscoveryTutorialBlur.xib in Resources */,
F6E2FDB91E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */,
34D3B02D1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */,
@ -5040,7 +4986,6 @@
F6E2FE0D1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */,
F6E2FE161E097BA00083EBEC /* MWMOpeningHoursTimeSelectorTableViewCell.xib in Resources */,
F6E2FE1C1E097BA00083EBEC /* MWMOpeningHoursTimeSpanTableViewCell.xib in Resources */,
F6C16A671F9626B2000FE296 /* ReviewsViewController.xib in Resources */,
F6BD1D241CA412E40047B8E8 /* MWMOsmAuthAlert.xib in Resources */,
F6FE3C3C1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib in Resources */,
F6E407D41FC4722F001F7821 /* MWMDiscoveryController.xib in Resources */,
@ -5085,7 +5030,6 @@
3463BA691DE81DB90082417F /* MWMTrafficButtonViewController.xib in Resources */,
F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */,
47E6CB0C2178BA3600EA102B /* SearchBannerCell.xib in Resources */,
344532341F6FE5880059FBCC /* UGCSummaryRatingStarsCell.xib in Resources */,
6741A9761BF340DE002C974C /* packed_polygons.bin in Resources */,
470A8A012136097000D72FBF /* SubwayTutorialBlur.xib in Resources */,
676507601C10559800830BB3 /* patterns.txt in Resources */,
@ -5112,7 +5056,6 @@
3D0D2F7623D858BF00945C8D /* IsolinesTutorialBlur.xib in Resources */,
47B505552136B0CF009CBB55 /* SearchTutorialBlur.xib in Resources */,
6741A97D1BF340DE002C974C /* synonyms.txt in Resources */,
34E50DF31F6FCC41008EED49 /* UGCYourReviewCell.xib in Resources */,
CDB4D4D7222D248900104869 /* CarPlayStoryboard.storyboard in Resources */,
47C8789122DF525A00A772DA /* SubscriptionSuccessViewController.xib in Resources */,
4707E4B42372FF480017DF6E /* PlacePage.storyboard in Resources */,
@ -5281,7 +5224,6 @@
34D3B0211E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.m in Sources */,
999FC12923ABAFFE00B0E6F9 /* GlobalStyleSheet.swift in Sources */,
99D363192358685300941BF4 /* SubscriptionGroupItem.swift in Sources */,
348F8A531F863B6100060C2A /* UGCReview.swift in Sources */,
340475501E081A4600C92850 /* fabric_logging_ios.mm in Sources */,
CDCA273A2237FCFE00167D87 /* SearchTemplateBuilder.swift in Sources */,
34F4073E1E9E1AFF00E57AC0 /* MPNativeAd+MWM.m in Sources */,
@ -5320,7 +5262,6 @@
4738A8E7239FC513007C0F43 /* AdBannerView.swift in Sources */,
349D1ABC1E2D05EF004A2006 /* SearchBar.swift in Sources */,
993F5511237C622700545511 /* DeepLinkCatalogueStrategy.swift in Sources */,
34E50DF81F6FCC96008EED49 /* UGCReviewCell.swift in Sources */,
F6E2FF3F1E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */,
F6E2FDE01E097BA00083EBEC /* MWMEditorViewController.mm in Sources */,
99DEF9D023E2CD67006BFD21 /* UISearchBar+swizzle.m in Sources */,
@ -5592,7 +5533,6 @@
F6E2FE041E097BA00083EBEC /* MWMOpeningHoursDaysSelectorTableViewCell.mm in Sources */,
472E3F472146BCD30020E412 /* SubscriptionManager.swift in Sources */,
F6E2FE131E097BA00083EBEC /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */,
344532311F6FE5880059FBCC /* UGCSummaryRatingStarsCell.swift in Sources */,
478F6FA623C4521F00054A53 /* MoreReviewsViewController.swift in Sources */,
F626D52F1C3E83F800C17D15 /* MWMTableViewCell.m in Sources */,
34AB66591FC5AA330078E451 /* TransportTransitFlowLayout.swift in Sources */,
@ -5635,7 +5575,6 @@
34BBD6601F8270360070CA50 /* AuthorizationiPadPresentationController.swift in Sources */,
F6E2FED31E097BA00083EBEC /* MWMSearchHotelsFilterViewController.mm in Sources */,
347752901F7251C7000D46A3 /* UGCAddReviewTextCell.swift in Sources */,
34E50DF01F6FCC41008EED49 /* UGCYourReviewCell.swift in Sources */,
34AB66381FC5AA330078E451 /* RouteManagerCell.swift in Sources */,
CD4A1F132305872700F2A6B6 /* PromoBookingPresentationController.swift in Sources */,
3472B5D3200F501500DC6CD5 /* BackgroundFetchTaskFrameworkType.swift in Sources */,
@ -5654,7 +5593,6 @@
47289E5A2212DFFF002ABFC0 /* EditOnWebAlertViewController.swift in Sources */,
34763EE71F2F392300F4D2D3 /* MWMTextToSpeech.mm in Sources */,
34ABA6251C2D551900FE1BEC /* MWMInputValidatorFactory.m in Sources */,
348F8A4F1F863A8500060C2A /* UGCYourReview.swift in Sources */,
999FC12223ABABA000B0E6F9 /* IFonts.swift in Sources */,
F6E2FEE21E097BA00083EBEC /* MWMSearchManager.mm in Sources */,
F6E2FE221E097BA00083EBEC /* MWMOpeningHoursEditorViewController.mm in Sources */,
@ -5678,7 +5616,6 @@
993F550F237C622700545511 /* DeepLinkMapStrategy.swift in Sources */,
34AB661A1FC5AA330078E451 /* MWMTaxiCollectionLayout.m in Sources */,
994AEC2B23AB763C0079B81F /* SwizzleStyle.m in Sources */,
345C2F8A1F86361B009DB8B4 /* MWMUGCViewModel.mm in Sources */,
33F8BA4E2199AB9500ECA8EE /* TagsDataSource.swift in Sources */,
993F5507237C622700545511 /* DeepLinkSearchStrategy.swift in Sources */,
994AEC1723AB763C0079B81F /* UIImageRenderer.swift in Sources */,
@ -5729,7 +5666,6 @@
3404754D1E081A4600C92850 /* MWMKeyboard.m in Sources */,
3457C4261F680F1900028233 /* String+BoundingRect.swift in Sources */,
34EF94291C05A6F30050B714 /* MWMSegue.m in Sources */,
3430291D1F87BF4400D0A07C /* ReviewsViewController.swift in Sources */,
CD96C70C22A681C400DB7CFE /* DiscoveryGuideCell.swift in Sources */,
47E3C7312111F4C2008B3B27 /* CoverVerticalPresentationAnimator.swift in Sources */,
99E2B0122368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift in Sources */,
@ -5757,7 +5693,6 @@
34AB39C21D2BD8310021857D /* MWMStopButton.m in Sources */,
995739082355CB660019AEE7 /* AllPassSubscriptionViewController.swift in Sources */,
3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */,
34E50DD81F6FCAB1008EED49 /* UGCSummaryRatingCell.swift in Sources */,
1185C52C23BB53A7004BF349 /* UIViewControllerRenderer.swift in Sources */,
6741AA281BF340DE002C974C /* MWMAlert.mm in Sources */,
F6E2FF571E097BA00083EBEC /* MWMMobileInternetViewController.m in Sources */,

View file

@ -444,12 +444,6 @@ void RegisterEventIfPossible(eye::MapObject::Event::Type const type)
[self.ownerViewController openUrl:url];
}
- (void)openReviews:(id<MWMReviewsViewModelProtocol> _Nonnull)reviewsViewModel
{
auto reviewsVC = [[MWMReviewsViewController alloc] initWithViewModel:reviewsViewModel];
[[MapViewController sharedController].navigationController pushViewController:reviewsVC animated:YES];
}
- (void)openWebsite:(PlacePageData *)data {
NSURL *url = [NSURL URLWithString:data.infoData.website];
if (url) {

View file

@ -1,15 +1,3 @@
@objc(MWMUGCRatingValueType)
class UGCRatingValueType: NSObject {
let value: String
let type: UgcSummaryRatingType
@objc init(value: String, type: UgcSummaryRatingType) {
self.value = value
self.type = type
super.init()
}
}
@objc(MWMUGCRatingStars)
final class UGCRatingStars: NSObject {
@objc let title: String

View file

@ -1,14 +0,0 @@
@objc(MWMUGCReview)
final class UGCReview: NSObject, MWMReviewProtocol {
let title: String
let date: String
let text: String
let rating: UGCRatingValueType
@objc init(title: String, date: String, text: String, rating: UGCRatingValueType) {
self.title = title
self.date = date
self.text = text
self.rating = rating
}
}

View file

@ -1,26 +0,0 @@
@objc(MWMUGCReviewCell)
final class UGCReviewCell: MWMTableViewCell {
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var dateLabel: UILabel!
@IBOutlet private weak var ratingView: RatingSummaryView!
@IBOutlet private weak var reviewLabel: ExpandableReviewView! {
didSet {
let settings = ExpandableReviewSettings(expandText: L("placepage_more_button"),
expandTextColor: .linkBlue(),
textColor: .blackPrimaryText(),
textFont: .regular14())
reviewLabel.apply(settings: settings)
}
}
@objc func config(review: UGCReview, isExpanded: Bool, onUpdate: @escaping () -> Void) {
titleLabel.text = review.title
dateLabel.text = review.date
reviewLabel.configure(text: review.text,
isExpanded: isExpanded,
onUpdate: onUpdate)
ratingView.value = review.rating.value
ratingView.type = review.rating.type
isSeparatorHidden = true
}
}

View file

@ -1,100 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="UGCReviewCell" id="KGk-i7-Jjw" customClass="MWMUGCReviewCell" propertyAccessControl="none">
<rect key="frame" x="0.0" y="0.0" width="320" height="135"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="135"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sVT-L4-Mlw">
<rect key="frame" x="0.0" y="-1" width="320" height="135.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3PE-rI-3N0">
<rect key="frame" x="16" y="16" width="42" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="bold14:blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CfZ-eF-OFu">
<rect key="frame" x="16" y="40.5" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular12:blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yfk-2d-jIs" customClass="RatingSummaryView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="256" y="16" width="48" height="20"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="20" placeholder="YES" id="GCB-u9-ND9"/>
<constraint firstAttribute="width" constant="48" placeholder="YES" id="TVO-Dx-h45"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RatingSummaryView24"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="762-NT-BKz" customClass="ExpandableReviewView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="16" y="77.5" width="288" height="41"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d1v-ce-wSZ">
<rect key="frame" x="0.0" y="134.5" width="320" height="1"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="juL-ad-Qhb"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="762-NT-BKz" firstAttribute="top" secondItem="CfZ-eF-OFu" secondAttribute="bottom" constant="16" id="1lo-ik-7Zm"/>
<constraint firstItem="CfZ-eF-OFu" firstAttribute="leading" secondItem="3PE-rI-3N0" secondAttribute="leading" id="51g-rF-VAQ"/>
<constraint firstItem="3PE-rI-3N0" firstAttribute="top" secondItem="sVT-L4-Mlw" secondAttribute="top" constant="16" id="Dsv-rC-mN3"/>
<constraint firstItem="3PE-rI-3N0" firstAttribute="leading" secondItem="sVT-L4-Mlw" secondAttribute="leading" constant="16" id="I43-QS-Z3Y"/>
<constraint firstItem="yfk-2d-jIs" firstAttribute="top" secondItem="sVT-L4-Mlw" secondAttribute="top" constant="16" id="IN6-Pr-eGH"/>
<constraint firstAttribute="trailing" secondItem="yfk-2d-jIs" secondAttribute="trailing" constant="16" id="Laz-IW-nlM"/>
<constraint firstAttribute="bottom" secondItem="d1v-ce-wSZ" secondAttribute="bottom" id="V6X-dF-duR"/>
<constraint firstItem="762-NT-BKz" firstAttribute="leading" secondItem="CfZ-eF-OFu" secondAttribute="leading" id="c4z-oJ-icf"/>
<constraint firstItem="d1v-ce-wSZ" firstAttribute="top" secondItem="762-NT-BKz" secondAttribute="bottom" priority="999" constant="16" id="cXY-MK-bsx"/>
<constraint firstItem="CfZ-eF-OFu" firstAttribute="top" secondItem="3PE-rI-3N0" secondAttribute="bottom" constant="4" id="dib-vK-VkM"/>
<constraint firstAttribute="trailing" secondItem="762-NT-BKz" secondAttribute="trailing" constant="16" id="eWs-tf-gnY"/>
<constraint firstItem="d1v-ce-wSZ" firstAttribute="leading" secondItem="sVT-L4-Mlw" secondAttribute="leading" id="fJH-u0-p1T"/>
<constraint firstAttribute="trailing" secondItem="d1v-ce-wSZ" secondAttribute="trailing" id="ix8-vC-6x9"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="sVT-L4-Mlw" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="NDg-Sq-JR5"/>
<constraint firstAttribute="bottom" secondItem="sVT-L4-Mlw" secondAttribute="bottom" constant="0.5" id="UOg-pG-9oV"/>
<constraint firstAttribute="trailing" secondItem="sVT-L4-Mlw" secondAttribute="trailing" id="lk8-vT-q6l"/>
<constraint firstItem="sVT-L4-Mlw" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="-1" id="oeh-CG-l1D"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="dateLabel" destination="CfZ-eF-OFu" id="RLX-Xu-oVJ"/>
<outlet property="ratingView" destination="yfk-2d-jIs" id="wyh-94-tVB"/>
<outlet property="reviewLabel" destination="762-NT-BKz" id="sqO-tb-UuV"/>
<outlet property="titleLabel" destination="3PE-rI-3N0" id="YqB-6N-buv"/>
</connections>
<point key="canvasLocation" x="141" y="155"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,54 +0,0 @@
@objc(MWMUGCSummaryRatingCell)
final class UGCSummaryRatingCell: MWMTableViewCell {
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var countLabel: UILabel!
@IBOutlet private weak var ratingSummaryView: RatingSummaryView!
@IBOutlet private weak var ratingCollectionViewHeight: NSLayoutConstraint!
@IBOutlet private weak var ratingCollectionView: UICollectionView! {
didSet {
ratingCollectionView.register(cellClass: UGCSummaryRatingStarsCell.self)
}
}
fileprivate var ratings: [UGCRatingStars]!
override var frame: CGRect {
didSet {
if frame.size != oldValue.size {
updateCollectionView()
}
}
}
@objc func config(reviewsCount: UInt, summaryRating: UGCRatingValueType, ratings: [UGCRatingStars]) {
countLabel.text = String(format:L("placepage_summary_rating_description"), reviewsCount)
ratingSummaryView.value = summaryRating.value
ratingSummaryView.type = summaryRating.type
self.ratings = ratings
updateCollectionView()
isSeparatorHidden = true
}
override func didMoveToSuperview() {
super.didMoveToSuperview()
updateCollectionView()
}
private func updateCollectionView() {
DispatchQueue.main.async {
self.ratingCollectionView.reloadData()
}
}
}
extension UGCSummaryRatingCell: UICollectionViewDataSource {
func collectionView(_: UICollectionView, numberOfItemsInSection _: Int) -> Int {
return ratings?.count ?? 0
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withCellClass: UGCSummaryRatingStarsCell.self, indexPath: indexPath) as! UGCSummaryRatingStarsCell
cell.config(rating: ratings[indexPath.item])
return cell
}
}

View file

@ -1,127 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="0.0" reuseIdentifier="UGCSummaryRatingCell" id="KGk-i7-Jjw" customClass="MWMUGCSummaryRatingCell" propertyAccessControl="none">
<rect key="frame" x="0.0" y="0.0" width="320" height="135"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="135"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MSt-Fx-y5y">
<rect key="frame" x="0.0" y="0.0" width="320" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vuk-Pr-u1F">
<rect key="frame" x="16" y="16" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="bold22:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="placepage_summary_rating"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dL4-7I-zUJ">
<rect key="frame" x="16" y="41" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular12:blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1wF-gY-Wza" customClass="RatingSummaryView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="200" y="19" width="104" height="40"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="104" placeholder="YES" id="K7d-bD-t4a"/>
<constraint firstAttribute="height" constant="40" placeholder="YES" id="XNy-10-mxa"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RatingSummaryView24:bold28"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ks7-ZL-gaO">
<rect key="frame" x="16" y="77" width="304" height="1"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="0Ow-i9-Mmd"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Ks7-ZL-gaO" secondAttribute="bottom" id="EQg-NU-aaE"/>
<constraint firstItem="Ks7-ZL-gaO" firstAttribute="leading" secondItem="vuk-Pr-u1F" secondAttribute="leading" id="EzT-6G-Aaz"/>
<constraint firstAttribute="trailing" secondItem="1wF-gY-Wza" secondAttribute="trailing" constant="16" id="TmZ-A7-jSz"/>
<constraint firstAttribute="bottom" secondItem="dL4-7I-zUJ" secondAttribute="bottom" constant="16" id="Y4t-mx-i4U"/>
<constraint firstItem="dL4-7I-zUJ" firstAttribute="top" secondItem="vuk-Pr-u1F" secondAttribute="bottom" constant="4" id="gwC-3A-Cn6"/>
<constraint firstAttribute="trailing" secondItem="Ks7-ZL-gaO" secondAttribute="trailing" id="rqS-JS-29d"/>
<constraint firstItem="vuk-Pr-u1F" firstAttribute="top" secondItem="MSt-Fx-y5y" secondAttribute="top" constant="16" id="sW5-pu-RyS"/>
<constraint firstItem="dL4-7I-zUJ" firstAttribute="leading" secondItem="vuk-Pr-u1F" secondAttribute="leading" id="t1x-yk-QNA"/>
<constraint firstItem="1wF-gY-Wza" firstAttribute="centerY" secondItem="MSt-Fx-y5y" secondAttribute="centerY" id="x7o-2J-PIT"/>
<constraint firstItem="vuk-Pr-u1F" firstAttribute="leading" secondItem="MSt-Fx-y5y" secondAttribute="leading" constant="16" id="ykf-u3-iXH"/>
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" prefetchingEnabled="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ek3-Zj-cfu">
<rect key="frame" x="0.0" y="78" width="320" height="56"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" priority="999" constant="56" id="NOt-1H-Ou6"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="12" minimumInteritemSpacing="16" id="liK-AI-Noj">
<size key="itemSize" width="120" height="32"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="16" minY="12" maxX="16" maxY="12"/>
</collectionViewFlowLayout>
<connections>
<outlet property="dataSource" destination="KGk-i7-Jjw" id="dDO-Dn-baT"/>
</connections>
</collectionView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="deV-cR-pmt">
<rect key="frame" x="0.0" y="134" width="320" height="1"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="xWy-nC-DYA"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="ek3-Zj-cfu" secondAttribute="trailing" id="Bqn-Ho-oHK"/>
<constraint firstItem="MSt-Fx-y5y" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="E6a-WS-t4d"/>
<constraint firstItem="deV-cR-pmt" firstAttribute="top" secondItem="ek3-Zj-cfu" secondAttribute="bottom" id="LVT-d5-pQ9"/>
<constraint firstItem="ek3-Zj-cfu" firstAttribute="top" secondItem="MSt-Fx-y5y" secondAttribute="bottom" id="Nof-jo-qQX"/>
<constraint firstItem="ek3-Zj-cfu" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="O1E-QI-WCE"/>
<constraint firstItem="deV-cR-pmt" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="ZMV-M7-CZf"/>
<constraint firstAttribute="trailing" secondItem="deV-cR-pmt" secondAttribute="trailing" id="cGS-Z6-Jhu"/>
<constraint firstAttribute="bottom" secondItem="deV-cR-pmt" secondAttribute="bottom" id="hYI-fo-9ZF"/>
<constraint firstAttribute="trailing" secondItem="MSt-Fx-y5y" secondAttribute="trailing" id="lrY-p6-nWm"/>
<constraint firstItem="MSt-Fx-y5y" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="vuv-N8-45j"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="countLabel" destination="dL4-7I-zUJ" id="Tff-bs-ZJ1"/>
<outlet property="ratingCollectionView" destination="ek3-Zj-cfu" id="yaA-5U-Hkd"/>
<outlet property="ratingCollectionViewHeight" destination="NOt-1H-Ou6" id="OAa-93-CP3"/>
<outlet property="ratingSummaryView" destination="1wF-gY-Wza" id="Cik-Nz-9lb"/>
<outlet property="titleLabel" destination="vuk-Pr-u1F" id="BS6-tI-lXe"/>
</connections>
<point key="canvasLocation" x="139" y="155"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,10 +0,0 @@
final class UGCSummaryRatingStarsCell: UICollectionViewCell {
@IBOutlet private weak var ratingView: RatingView!
func config(rating: UGCRatingStars) {
ratingView.topText = L(rating.title)
ratingView.value = rating.value
ratingView.starsCount = Int(rating.maxValue)
}
}

View file

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="UGCSummaryRatingStarsCell" customModule="maps_me" customModuleProvider="target" propertyAccessControl="all">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BLZ-qJ-zka" customClass="RatingView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="starSize">
<real key="value" value="12"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
</view>
<constraints>
<constraint firstAttribute="bottom" secondItem="BLZ-qJ-zka" secondAttribute="bottom" id="M7R-Mt-lBd"/>
<constraint firstItem="BLZ-qJ-zka" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="YpT-Vp-9OA"/>
<constraint firstAttribute="trailing" secondItem="BLZ-qJ-zka" secondAttribute="trailing" id="ZjF-5Y-apH"/>
<constraint firstItem="BLZ-qJ-zka" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="w5m-wz-I5t"/>
</constraints>
<connections>
<outlet property="ratingView" destination="BLZ-qJ-zka" id="BH2-xM-9PK"/>
</connections>
</collectionViewCell>
</objects>
</document>

View file

@ -1,12 +0,0 @@
@objc(MWMUGCYourReview)
final class UGCYourReview: NSObject, MWMReviewProtocol {
let date: String
let text: String
let ratings: [UGCRatingStars]
@objc init(date: String, text: String, ratings: [UGCRatingStars]) {
self.date = date
self.text = text
self.ratings = ratings
}
}

View file

@ -1,69 +0,0 @@
@objc(MWMUGCYourReviewCell)
final class UGCYourReviewCell: MWMTableViewCell {
private enum Config {
static let defaultReviewBottomOffset: CGFloat = 16
}
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var dateLabel: UILabel!
@IBOutlet private weak var reviewLabel: ExpandableReviewView! {
didSet {
let settings = ExpandableReviewSettings(expandText: L("placepage_more_button"),
expandTextColor: .linkBlue(),
textColor: .blackPrimaryText(),
textFont: .regular14())
reviewLabel.apply(settings: settings)
}
}
@IBOutlet private weak var reviewBottomOffset: NSLayoutConstraint!
@IBOutlet private weak var ratingCollectionView: UICollectionView! {
didSet {
ratingCollectionView.register(cellClass: UGCSummaryRatingStarsCell.self)
}
}
private var yourReview: UGCYourReview!
override var frame: CGRect {
didSet {
if frame.size != oldValue.size {
updateCollectionView()
}
}
}
@objc func config(yourReview: UGCYourReview, isExpanded: Bool, onUpdate: @escaping () -> Void) {
dateLabel.text = yourReview.date
self.yourReview = yourReview
reviewLabel.configure(text: yourReview.text,
isExpanded: isExpanded,
onUpdate: onUpdate)
reviewBottomOffset.constant = yourReview.text.isEmpty ? 0 : Config.defaultReviewBottomOffset
updateCollectionView()
isSeparatorHidden = true
}
override func didMoveToSuperview() {
super.didMoveToSuperview()
updateCollectionView()
}
private func updateCollectionView() {
DispatchQueue.main.async {
self.ratingCollectionView.reloadData()
}
}
}
extension UGCYourReviewCell: UICollectionViewDataSource {
func collectionView(_: UICollectionView, numberOfItemsInSection _: Int) -> Int {
return yourReview?.ratings.count ?? 0
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withCellClass: UGCSummaryRatingStarsCell.self, indexPath: indexPath) as! UGCSummaryRatingStarsCell
cell.config(rating: yourReview!.ratings[indexPath.item])
return cell
}
}

View file

@ -1,125 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="UGCYourReviewCell" id="KGk-i7-Jjw" customClass="MWMUGCYourReviewCell" propertyAccessControl="none">
<rect key="frame" x="0.0" y="0.0" width="320" height="192"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="192"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M3q-L0-4Y7" propertyAccessControl="none">
<rect key="frame" x="0.0" y="0.0" width="320" height="135"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nht-6C-S3i">
<rect key="frame" x="16" y="16" width="42" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="bold14:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="placepage_reviews_your_comment"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qZ5-I9-7dJ">
<rect key="frame" x="16" y="40.5" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular12:blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G4x-pj-fmv" customClass="ExpandableReviewView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="16" y="77.5" width="288" height="40.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aOE-yo-hUQ">
<rect key="frame" x="16" y="134" width="304" height="1"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="E6L-PS-9ij"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="G4x-pj-fmv" firstAttribute="leading" secondItem="qZ5-I9-7dJ" secondAttribute="leading" id="0tv-ab-Ino"/>
<constraint firstItem="aOE-yo-hUQ" firstAttribute="leading" secondItem="nht-6C-S3i" secondAttribute="leading" id="5zo-5x-C5V"/>
<constraint firstItem="qZ5-I9-7dJ" firstAttribute="leading" secondItem="nht-6C-S3i" secondAttribute="leading" id="Gau-1M-wwW"/>
<constraint firstItem="aOE-yo-hUQ" firstAttribute="top" secondItem="G4x-pj-fmv" secondAttribute="bottom" priority="999" constant="16" id="NW0-Eu-IsI"/>
<constraint firstItem="G4x-pj-fmv" firstAttribute="top" secondItem="qZ5-I9-7dJ" secondAttribute="bottom" constant="16" id="OH9-Mm-dbX"/>
<constraint firstAttribute="trailing" secondItem="G4x-pj-fmv" secondAttribute="trailing" constant="16" id="PNg-SO-p6V"/>
<constraint firstItem="nht-6C-S3i" firstAttribute="leading" secondItem="M3q-L0-4Y7" secondAttribute="leading" constant="16" id="PY2-qj-nDO"/>
<constraint firstItem="qZ5-I9-7dJ" firstAttribute="top" secondItem="nht-6C-S3i" secondAttribute="bottom" constant="4" id="S3o-tR-arb"/>
<constraint firstAttribute="trailing" secondItem="aOE-yo-hUQ" secondAttribute="trailing" id="cx3-dh-2bm"/>
<constraint firstAttribute="bottom" secondItem="aOE-yo-hUQ" secondAttribute="bottom" id="hbw-cC-TVb"/>
<constraint firstItem="nht-6C-S3i" firstAttribute="top" secondItem="M3q-L0-4Y7" secondAttribute="top" constant="16" id="v5J-lZ-cdA"/>
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" prefetchingEnabled="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w6j-GC-6Bv">
<rect key="frame" x="0.0" y="135" width="320" height="56"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" priority="999" constant="56" id="2hn-mr-UAw"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="12" minimumInteritemSpacing="16" id="MWR-PM-MMO">
<size key="itemSize" width="120" height="32"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="16" minY="12" maxX="16" maxY="12"/>
</collectionViewFlowLayout>
<connections>
<outlet property="dataSource" destination="KGk-i7-Jjw" id="XNi-U1-zp7"/>
</connections>
</collectionView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l8v-v7-2Xf">
<rect key="frame" x="0.0" y="191" width="320" height="1"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="FbW-ej-brB"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="l8v-v7-2Xf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="77N-Z4-HEp"/>
<constraint firstItem="w6j-GC-6Bv" firstAttribute="top" secondItem="M3q-L0-4Y7" secondAttribute="bottom" id="L8X-HU-Nlw"/>
<constraint firstItem="M3q-L0-4Y7" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="T9p-nW-wRb"/>
<constraint firstItem="M3q-L0-4Y7" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="WVZ-X8-ZDo"/>
<constraint firstAttribute="trailing" secondItem="w6j-GC-6Bv" secondAttribute="trailing" id="XBx-IK-uxK"/>
<constraint firstAttribute="trailing" secondItem="M3q-L0-4Y7" secondAttribute="trailing" id="azy-n1-1rx"/>
<constraint firstAttribute="trailing" secondItem="M3q-L0-4Y7" secondAttribute="trailing" id="cLA-Dj-Ldj"/>
<constraint firstAttribute="bottom" secondItem="l8v-v7-2Xf" secondAttribute="bottom" id="l0O-cH-aHC"/>
<constraint firstItem="l8v-v7-2Xf" firstAttribute="top" secondItem="w6j-GC-6Bv" secondAttribute="bottom" id="nHN-wy-OWN"/>
<constraint firstItem="w6j-GC-6Bv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="nP1-Z3-mNg"/>
<constraint firstItem="M3q-L0-4Y7" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="pqg-Sh-Khw"/>
<constraint firstAttribute="trailing" secondItem="l8v-v7-2Xf" secondAttribute="trailing" id="tjg-JB-UYP"/>
<constraint firstItem="M3q-L0-4Y7" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="xIs-eU-Xzv"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="dateLabel" destination="qZ5-I9-7dJ" id="Hkf-h6-ybf"/>
<outlet property="ratingCollectionView" destination="w6j-GC-6Bv" id="SbY-HY-zXO"/>
<outlet property="reviewBottomOffset" destination="NW0-Eu-IsI" id="emL-VB-8lD"/>
<outlet property="reviewLabel" destination="G4x-pj-fmv" id="pWq-RG-xv0"/>
<outlet property="titleLabel" destination="nht-6C-S3i" id="1lQ-nA-n7z"/>
</connections>
<point key="canvasLocation" x="139" y="155"/>
</tableViewCell>
</objects>
</document>

View file

@ -677,40 +677,3 @@ extension PlacePageViewController: MWMLocationObserver {
}
}
extension UgcData: MWMReviewsViewModelProtocol {
public func numberOfReviews() -> Int {
reviews.count
}
public func review(with index: Int) -> MWMReviewProtocol {
UgcReviewAdapter(reviews[index])
}
public func isExpanded(_ review: MWMReviewProtocol) -> Bool {
false
}
public func markExpanded(_ review: MWMReviewProtocol) {
}
}
class UgcReviewAdapter: MWMReviewProtocol {
var date: String {
let formatter = DateFormatter()
formatter.dateStyle = .long
formatter.timeStyle = .none
return formatter.string(from: ugcReview.date)
}
var text: String {
ugcReview.text
}
private let ugcReview: UgcReview
init(_ review: UgcReview) {
ugcReview = review
}
}

View file

@ -1,49 +0,0 @@
#import "MWMReviewsViewModelProtocol.h"
#include <vector>
typedef NS_ENUM(NSUInteger, MWMUGCViewModelPrice) {
MWMUGCViewModelPriceLow,
MWMUGCViewModelPriceMedium,
MWMUGCViewModelPriceHigh
};
namespace ugc
{
struct UGC;
struct UGCUpdate;
namespace view_model
{
enum class ReviewRow
{
YourReview,
Review,
MoreReviews
};
} // namespace view_model
} // namespace ugc
@class MWMUGCRatingValueType;
@class MWMUGCRatingStars;
@class MWMUGCYourReview;
@class MWMUGCReview;
@protocol MWMReviewsViewModelProtocol;
@interface MWMUGCViewModel : NSObject<MWMReviewsViewModelProtocol>
- (instancetype)initWithUGC:(ugc::UGC const &)ugc update:(ugc::UGCUpdate const &)update;
- (BOOL)isUGCEmpty;
- (BOOL)isUGCUpdateEmpty;
- (BOOL)isAggregatedRatingEmpty;
- (NSUInteger)ratingCellsCount;
- (NSUInteger)addReviewCellsCount;
- (std::vector<ugc::view_model::ReviewRow> const &)reviewRows;
- (NSUInteger)numberOfRatings;
- (MWMUGCRatingValueType *)summaryRating;
- (NSArray<MWMUGCRatingStars *> *)ratings;
@end

View file

@ -1,151 +0,0 @@
#import "MWMUGCViewModel.h"
#import "SwiftBridge.h"
#include "map/place_page_info.hpp"
using namespace place_page;
namespace
{
NSArray<MWMUGCRatingStars *> * starsRatings(ugc::Ratings const & ratings)
{
NSMutableArray<MWMUGCRatingStars *> * mwmRatings = [@[] mutableCopy];
for (auto const & rec : ratings)
[mwmRatings addObject:[[MWMUGCRatingStars alloc] initWithTitle:@(rec.m_key.m_key.c_str())
value:rec.m_value
maxValue:5]];
return [mwmRatings copy];
}
UgcSummaryRatingType ratingValueType(rating::Impress impress)
{
switch (impress)
{
case rating::Impress::None: return UgcSummaryRatingTypeNone;
case rating::Impress::Horrible: return UgcSummaryRatingTypeHorrible;
case rating::Impress::Bad: return UgcSummaryRatingTypeBad;
case rating::Impress::Normal: return UgcSummaryRatingTypeNormal;
case rating::Impress::Good: return UgcSummaryRatingTypeGood;
case rating::Impress::Excellent: return UgcSummaryRatingTypeExcellent;
}
}
MWMUGCRatingValueType * ratingValueType(float rating)
{
NSString *value = @(rating::GetRatingFormatted(rating).c_str());
return [[MWMUGCRatingValueType alloc]
initWithValue:value ?: @""
type:ratingValueType(rating::GetImpress(rating))];
}
} // namespace
@interface MWMUGCViewModel ()
@property(copy, nonatomic) MWMVoidBlock refreshCallback;
@property(strong, nonatomic) NSMutableDictionary *expandedReviews;
@end
@implementation MWMUGCViewModel
{
ugc::UGC m_ugc;
ugc::UGCUpdate m_ugcUpdate;
std::vector<ugc::view_model::ReviewRow> m_reviewRows;
}
- (instancetype)initWithUGC:(ugc::UGC const &)ugc update:(ugc::UGCUpdate const &)update
{
self = [super init];
if (self)
{
_expandedReviews = [[NSMutableDictionary alloc] initWithCapacity: 1];
m_ugc = ugc;
m_ugcUpdate = update;
[self fillReviewRows];
}
return self;
}
- (void)fillReviewRows
{
using namespace ugc::view_model;
m_reviewRows.clear();
if (!m_ugcUpdate.IsEmpty())
m_reviewRows.push_back(ReviewRow::YourReview);
if (m_ugc.IsEmpty())
return;
auto const reviewsSize = m_ugc.m_reviews.size();
auto constexpr kMaxSize = 3;
if (reviewsSize > kMaxSize)
{
m_reviewRows.insert(m_reviewRows.end(), kMaxSize, ReviewRow::Review);
m_reviewRows.push_back(ReviewRow::MoreReviews);
}
else
{
m_reviewRows.insert(m_reviewRows.end(), reviewsSize, ReviewRow::Review);
}
}
- (BOOL)isUGCEmpty { return static_cast<BOOL>(m_ugc.IsEmpty()); }
- (BOOL)isUGCUpdateEmpty { return static_cast<BOOL>(m_ugcUpdate.IsEmpty()); }
- (BOOL)isAggregatedRatingEmpty { return m_ugc.m_totalRating == kIncorrectRating; }
- (NSUInteger)ratingCellsCount { return 1; }
- (NSUInteger)addReviewCellsCount { return 1; }
- (NSUInteger)numberOfRatings { return static_cast<NSUInteger>(m_ugc.m_basedOn); }
- (MWMUGCRatingValueType *)summaryRating { return ratingValueType(m_ugc.m_totalRating); }
- (NSArray<MWMUGCRatingStars *> *)ratings { return starsRatings(m_ugc.m_ratings); }
- (std::vector<ugc::view_model::ReviewRow> const &)reviewRows { return m_reviewRows; }
#pragma mark - MWMReviewsViewModelProtocol
- (NSInteger)numberOfReviews { return m_ugc.m_reviews.size() + !self.isUGCUpdateEmpty; }
- (id<MWMReviewProtocol> _Nonnull)reviewWithIndex:(NSInteger)index
{
auto idx = index;
NSAssert(idx >= 0, @"Invalid index");
if (!self.isUGCUpdateEmpty)
{
if (idx == 0)
{
auto const & review = m_ugcUpdate;
return [[MWMUGCYourReview alloc]
initWithDate:[self reviewDate:review.m_time]
text:@(review.m_text.m_text.c_str())
ratings:starsRatings(review.m_ratings)];
}
idx -= 1;
}
NSAssert(idx < m_ugc.m_reviews.size(), @"Invalid index");
auto const & review = m_ugc.m_reviews[idx];
return [[MWMUGCReview alloc]
initWithTitle:@(review.m_author.c_str())
date:[self reviewDate:review.m_time]
text:@(review.m_text.m_text.c_str())
rating:ratingValueType(review.m_rating)];
}
- (BOOL)isExpanded:(id<MWMReviewProtocol> _Nonnull) review {
NSString *key = [[NSString alloc] initWithFormat:@"%@%lu", review.date, (unsigned long)[review.text hash]];
return _expandedReviews[key] == nil ? NO : YES;
}
- (void)markExpanded:(id<MWMReviewProtocol> _Nonnull) review {
NSString *key = [[NSString alloc] initWithFormat:@"%@%lu", review.date, (unsigned long)[review.text hash]];
_expandedReviews[key] = @YES;
}
#pragma mark - Propertis
- (NSString *)reviewDate:(ugc::Time const &) time
{
using namespace std::chrono;
auto reviewDate = [NSDate dateWithTimeIntervalSince1970:duration_cast<seconds>(time.time_since_epoch()).count()];
auto formatter = [[NSDateFormatter alloc] init];
formatter.dateStyle = NSDateFormatterLongStyle;
formatter.timeStyle = NSDateFormatterNoStyle;
return [formatter stringFromDate:reviewDate];
}
@end

View file

@ -1,4 +0,0 @@
@protocol MWMReviewProtocol
@property(nonatomic, readonly, copy) NSString * _Nonnull date;
@property(nonatomic, readonly, copy) NSString * _Nonnull text;
@end

View file

@ -1,8 +0,0 @@
#import "MWMReviewProtocol.h"
@protocol MWMReviewsViewModelProtocol
- (NSInteger)numberOfReviews;
- (id<MWMReviewProtocol> _Nonnull)reviewWithIndex:(NSInteger)index;
- (BOOL)isExpanded:(id<MWMReviewProtocol> _Nonnull) review;
- (void)markExpanded:(id<MWMReviewProtocol> _Nonnull) review;
@end

View file

@ -1,61 +0,0 @@
@objc(MWMReviewsViewController)
final class ReviewsViewController: MWMTableViewController {
private let viewModel: MWMReviewsViewModelProtocol
@objc init(viewModel: MWMReviewsViewModelProtocol) {
self.viewModel = viewModel
super.init(nibName: toString(type(of: self)), bundle: nil)
}
required init?(coder _: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
registerCells()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
tableView.refresh()
}
private func registerCells() {
[UGCYourReviewCell.self, UGCReviewCell.self].forEach {
tableView.register(cellClass: $0)
}
}
override func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
return viewModel.numberOfReviews()
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cellModel = viewModel.review(with: indexPath.row)
switch cellModel {
case let cellModel as UGCYourReview:
let cell = tableView.dequeueReusableCell(withCellClass: UGCYourReviewCell.self, indexPath: indexPath) as! UGCYourReviewCell
cell.config(yourReview: cellModel,
isExpanded: viewModel.isExpanded(cellModel),
onUpdate: { [weak self] in
guard let self = self else { return }
self.viewModel.markExpanded(cellModel)
self.tableView.refresh()
})
return cell
case let cellModel as UGCReview:
let cell = tableView.dequeueReusableCell(withCellClass: UGCReviewCell.self, indexPath: indexPath) as! UGCReviewCell
cell.config(review: cellModel,
isExpanded: viewModel.isExpanded(cellModel),
onUpdate: { [weak self] in
guard let self = self else { return }
self.viewModel.markExpanded(cellModel)
self.tableView.refresh()
})
return cell
default: assert(false)
}
return UITableViewCell()
}
}

View file

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMReviewsViewController">
<connections>
<outlet property="view" destination="lVr-YN-KhP" id="I4g-tu-lu5"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="lVr-YN-KhP" propertyAccessControl="all">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<point key="canvasLocation" x="55" y="-11"/>
</tableView>
</objects>
</document>