[themes] [ios] Fixed void block type naming.

This commit is contained in:
Ilya Grechuhin 2017-01-31 10:38:03 +03:00 committed by Sergey Yershov
parent 4ed9fbc45a
commit 9b17059306
37 changed files with 180 additions and 167 deletions

View file

@ -21,7 +21,7 @@ static inline CGFloat LengthCGPoint(CGPoint point)
@interface NSObject (Optimized)
+ (NSString *)className;
- (void)performAfterDelay:(NSTimeInterval)delayInSec block:(TMWMVoidBlock)block;
- (void)performAfterDelay:(NSTimeInterval)delayInSec block:(MWMVoidBlock)block;
@end
@ -47,7 +47,13 @@ static inline CGFloat LengthCGPoint(CGPoint point)
@property (nonatomic) CGFloat height;
@property (nonatomic) CGSize size;
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay damping:(double)dampingRatio initialVelocity:(double)springVelocity options:(UIViewAnimationOptions)options animations:(TMWMVoidBlock)animations completion:(void (^)(BOOL finished))completion;
+ (void)animateWithDuration:(NSTimeInterval)duration
delay:(NSTimeInterval)delay
damping:(double)dampingRatio
initialVelocity:(double)springVelocity
options:(UIViewAnimationOptions)options
animations:(MWMVoidBlock)animations
completion:(void (^)(BOOL finished))completion;
- (void)sizeToIntegralFit;
@end

View file

@ -9,7 +9,7 @@
@implementation NSObject (Optimized)
+ (NSString *)className { return NSStringFromClass(self); }
- (void)performAfterDelay:(NSTimeInterval)delayInSec block:(TMWMVoidBlock)block
- (void)performAfterDelay:(NSTimeInterval)delayInSec block:(MWMVoidBlock)block
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSec * NSEC_PER_SEC)),
dispatch_get_main_queue(), ^{
@ -80,7 +80,7 @@
damping:(double)dampingRatio
initialVelocity:(double)springVelocity
options:(UIViewAnimationOptions)options
animations:(TMWMVoidBlock)animations
animations:(MWMVoidBlock)animations
completion:(void (^)(BOOL))completion
{
[UIView animateWithDuration:duration

View file

@ -2,8 +2,11 @@
@interface MWMAddPlaceNavigationBar : SolidTouchView
+ (void)showInSuperview:(UIView *)superview isBusiness:(BOOL)isBusiness
applyPosition:(BOOL)applyPosition position:(m2::PointD const &)position
doneBlock:(TMWMVoidBlock)done cancelBlock:(TMWMVoidBlock)cancel;
+ (void)showInSuperview:(UIView *)superview
isBusiness:(BOOL)isBusiness
applyPosition:(BOOL)applyPosition
position:(m2::PointD const &)position
doneBlock:(MWMVoidBlock)done
cancelBlock:(MWMVoidBlock)cancel;
@end

View file

@ -5,16 +5,19 @@
@interface MWMAddPlaceNavigationBar ()
@property (copy, nonatomic) TMWMVoidBlock doneBlock;
@property (copy, nonatomic) TMWMVoidBlock cancelBlock;
@property(copy, nonatomic) MWMVoidBlock doneBlock;
@property(copy, nonatomic) MWMVoidBlock cancelBlock;
@end
@implementation MWMAddPlaceNavigationBar
+ (void)showInSuperview:(UIView *)superview isBusiness:(BOOL)isBusiness
applyPosition:(BOOL)applyPosition position:(m2::PointD const &)position
doneBlock:(TMWMVoidBlock)done cancelBlock:(TMWMVoidBlock)cancel
+ (void)showInSuperview:(UIView *)superview
isBusiness:(BOOL)isBusiness
applyPosition:(BOOL)applyPosition
position:(m2::PointD const &)position
doneBlock:(MWMVoidBlock)done
cancelBlock:(MWMVoidBlock)cancel
{
MWMAddPlaceNavigationBar * navBar = [[[NSBundle mainBundle] loadNibNamed:self.className owner:nil options:nil] firstObject];
navBar.width = superview.width;
@ -39,7 +42,7 @@
}];
}
- (void)dismissWithBlock:(TMWMVoidBlock)block
- (void)dismissWithBlock:(MWMVoidBlock)block
{
auto & f = GetFramework();
f.EnableChoosePositionMode(false /* enable */, false /* enableBounds */, false /* applyPosition */, m2::PointD());

View file

@ -11,47 +11,47 @@
- (nonnull instancetype)initWithViewController:(nonnull UIViewController *)viewController;
- (void)presentAlert:(routing::IRouter::ResultCode)type;
- (void)presentRoutingMigrationAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentRoutingMigrationAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock;
- (void)presentDownloaderAlertWithCountries:(storage::TCountriesVec const &)countries
code:(routing::IRouter::ResultCode)code
cancelBlock:(nonnull TMWMVoidBlock)cancelBlock
downloadBlock:(nonnull TMWMDownloadBlock)downloadBlock
downloadCompleteBlock:(nonnull TMWMVoidBlock)downloadCompleteBlock;
cancelBlock:(nonnull MWMVoidBlock)cancelBlock
downloadBlock:(nonnull MWMDownloadBlock)downloadBlock
downloadCompleteBlock:(nonnull MWMVoidBlock)downloadCompleteBlock;
- (void)presentRateAlert;
- (void)presentFacebookAlert;
- (void)presentPoint2PointAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
- (void)presentPoint2PointAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
needToRebuild:(BOOL)needToRebuild;
- (void)presentRoutingDisclaimerAlertWithOkBlock:(nonnull nonnull TMWMVoidBlock)block;
- (void)presentRoutingDisclaimerAlertWithOkBlock:(nonnull nonnull MWMVoidBlock)block;
- (void)presentDisabledLocationAlert;
- (void)presentLocationAlert;
- (void)presentLocationServiceNotSupportedAlert;
- (void)presentLocationNotFoundAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentLocationNotFoundAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock;
- (void)presentNoConnectionAlert;
- (void)presentMigrationProhibitedAlert;
- (void)presentDeleteMapProhibitedAlert;
- (void)presentUnsavedEditsAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentNoWiFiAlertWithOkBlock:(nullable TMWMVoidBlock)okBlock;
- (void)presentUnsavedEditsAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock;
- (void)presentNoWiFiAlertWithOkBlock:(nullable MWMVoidBlock)okBlock;
- (void)presentIncorrectFeauturePositionAlert;
- (void)presentInternalErrorAlert;
- (void)presentNotEnoughSpaceAlert;
- (void)presentInvalidUserNameOrPasswordAlert;
- (void)presentDisableAutoDownloadAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentDownloaderNoConnectionAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
cancelBlock:(nonnull TMWMVoidBlock)cancelBlock;
- (void)presentDisableAutoDownloadAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock;
- (void)presentDownloaderNoConnectionAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
cancelBlock:(nonnull MWMVoidBlock)cancelBlock;
- (void)presentDownloaderNotEnoughSpaceAlert;
- (void)presentDownloaderInternalErrorAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
cancelBlock:(nonnull TMWMVoidBlock)cancelBlock;
- (void)presentDownloaderNeedUpdateAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentDownloaderInternalErrorAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
cancelBlock:(nonnull MWMVoidBlock)cancelBlock;
- (void)presentDownloaderNeedUpdateAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock;
- (void)presentPlaceDoesntExistAlertWithBlock:(nonnull MWMStringBlock)block;
- (void)presentResetChangesAlertWithBlock:(nonnull TMWMVoidBlock)block;
- (void)presentDeleteFeatureAlertWithBlock:(nonnull TMWMVoidBlock)block;
- (void)presentResetChangesAlertWithBlock:(nonnull MWMVoidBlock)block;
- (void)presentDeleteFeatureAlertWithBlock:(nonnull MWMVoidBlock)block;
- (void)presentEditorViralAlert;
- (void)presentOsmAuthAlert;
- (void)presentPersonalInfoWarningAlertWithBlock:(nonnull TMWMVoidBlock)block;
- (void)presentTrackWarningAlertWithCancelBlock:(nonnull TMWMVoidBlock)block;
- (void)presentPersonalInfoWarningAlertWithBlock:(nonnull MWMVoidBlock)block;
- (void)presentTrackWarningAlertWithCancelBlock:(nonnull MWMVoidBlock)block;
- (void)presentSearchNoResultsAlert;
- (void)presentMobileInternetAlertWithBlock:(nonnull TMWMVoidBlock)block;
- (void)closeAlert:(nullable TMWMVoidBlock)completion;
- (void)presentMobileInternetAlertWithBlock:(nonnull MWMVoidBlock)block;
- (void)closeAlert:(nullable MWMVoidBlock)completion;
- (nonnull instancetype)init __attribute__((unavailable("call -initWithViewController: instead!")));
+ (nonnull instancetype) new __attribute__((unavailable("call -initWithViewController: instead!")));

View file

@ -55,7 +55,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
if (![MapViewController controller].welcomePageController)
[self displayAlert:[MWMAlert locationAlert]];
}
- (void)presentPoint2PointAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
- (void)presentPoint2PointAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
needToRebuild:(BOOL)needToRebuild
{
[self displayAlert:[MWMAlert point2PointAlertWithOkBlock:okBlock needToRebuild:needToRebuild]];
@ -67,7 +67,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:MWMAlert.locationServiceNotSupportedAlert];
}
- (void)presentLocationNotFoundAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
- (void)presentLocationNotFoundAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
{
[self displayAlert:[MWMLocationNotFoundAlert alertWithOkBlock:okBlock]];
}
@ -75,12 +75,12 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
- (void)presentNoConnectionAlert { [self displayAlert:[MWMAlert noConnectionAlert]]; }
- (void)presentMigrationProhibitedAlert { [self displayAlert:[MWMAlert migrationProhibitedAlert]]; }
- (void)presentDeleteMapProhibitedAlert { [self displayAlert:[MWMAlert deleteMapProhibitedAlert]]; }
- (void)presentUnsavedEditsAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
- (void)presentUnsavedEditsAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert unsavedEditsAlertWithOkBlock:okBlock]];
}
- (void)presentNoWiFiAlertWithOkBlock:(nullable TMWMVoidBlock)okBlock
- (void)presentNoWiFiAlertWithOkBlock:(nullable MWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert noWiFiAlertWithOkBlock:okBlock]];
}
@ -97,16 +97,16 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert invalidUserNameOrPasswordAlert]];
}
- (void)presentRoutingMigrationAlertWithOkBlock:(TMWMVoidBlock)okBlock
- (void)presentRoutingMigrationAlertWithOkBlock:(MWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert routingMigrationAlertWithOkBlock:okBlock]];
}
- (void)presentDownloaderAlertWithCountries:(storage::TCountriesVec const &)countries
code:(routing::IRouter::ResultCode)code
cancelBlock:(TMWMVoidBlock)cancelBlock
downloadBlock:(TMWMDownloadBlock)downloadBlock
downloadCompleteBlock:(TMWMVoidBlock)downloadCompleteBlock
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
downloadCompleteBlock:(MWMVoidBlock)downloadCompleteBlock
{
[self displayAlert:[MWMAlert downloaderAlertWithAbsentCountries:countries
code:code
@ -115,7 +115,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
downloadCompleteBlock:downloadCompleteBlock]];
}
- (void)presentRoutingDisclaimerAlertWithOkBlock:(TMWMVoidBlock)block
- (void)presentRoutingDisclaimerAlertWithOkBlock:(MWMVoidBlock)block
{
[self displayAlert:[MWMAlert routingDisclaimerAlertWithOkBlock:block]];
}
@ -126,13 +126,13 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert alert:type]];
}
- (void)presentDisableAutoDownloadAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
- (void)presentDisableAutoDownloadAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert disableAutoDownloadAlertWithOkBlock:okBlock]];
}
- (void)presentDownloaderNoConnectionAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
cancelBlock:(nonnull TMWMVoidBlock)cancelBlock
- (void)presentDownloaderNoConnectionAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
cancelBlock:(nonnull MWMVoidBlock)cancelBlock
{
[self displayAlert:[MWMAlert downloaderNoConnectionAlertWithOkBlock:okBlock
cancelBlock:cancelBlock]];
@ -143,14 +143,14 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert downloaderNotEnoughSpaceAlert]];
}
- (void)presentDownloaderInternalErrorAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
cancelBlock:(nonnull TMWMVoidBlock)cancelBlock
- (void)presentDownloaderInternalErrorAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
cancelBlock:(nonnull MWMVoidBlock)cancelBlock
{
[self displayAlert:[MWMAlert downloaderInternalErrorAlertWithOkBlock:okBlock
cancelBlock:cancelBlock]];
}
- (void)presentDownloaderNeedUpdateAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
- (void)presentDownloaderNeedUpdateAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert downloaderNeedUpdateAlertWithOkBlock:okBlock]];
}
@ -160,22 +160,22 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert placeDoesntExistAlertWithBlock:block]];
}
- (void)presentResetChangesAlertWithBlock:(TMWMVoidBlock)block
- (void)presentResetChangesAlertWithBlock:(MWMVoidBlock)block
{
[self displayAlert:[MWMAlert resetChangesAlertWithBlock:block]];
}
- (void)presentDeleteFeatureAlertWithBlock:(TMWMVoidBlock)block
- (void)presentDeleteFeatureAlertWithBlock:(MWMVoidBlock)block
{
[self displayAlert:[MWMAlert deleteFeatureAlertWithBlock:block]];
}
- (void)presentPersonalInfoWarningAlertWithBlock:(nonnull TMWMVoidBlock)block
- (void)presentPersonalInfoWarningAlertWithBlock:(nonnull MWMVoidBlock)block
{
[self displayAlert:[MWMAlert personalInfoWarningAlertWithBlock:block]];
}
- (void)presentTrackWarningAlertWithCancelBlock:(nonnull TMWMVoidBlock)block
- (void)presentTrackWarningAlertWithCancelBlock:(nonnull MWMVoidBlock)block
{
[self displayAlert:[MWMAlert trackWarningAlertWithCancelBlock:block]];
}
@ -202,7 +202,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[alert update];
}
- (void)presentMobileInternetAlertWithBlock:(nonnull TMWMVoidBlock)block
- (void)presentMobileInternetAlertWithBlock:(nonnull MWMVoidBlock)block
{
[self displayAlert:[MWMMobileInternetAlert alertWithBlock:block]];
}
@ -247,7 +247,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[MapsAppDelegate.theApp.window endEditing:YES];
}
- (void)closeAlert:(nullable TMWMVoidBlock)completion
- (void)closeAlert:(nullable MWMVoidBlock)completion
{
NSArray * subviews = self.view.subviews;
MWMAlert * closeAlert = subviews.lastObject;

View file

@ -1,7 +1,7 @@
#include "routing/router.hpp"
#include "storage/storage.hpp"
using TMWMDownloadBlock = void (^)(storage::TCountriesVec const &, TMWMVoidBlock);
using MWMDownloadBlock = void (^)(storage::TCountriesVec const &, MWMVoidBlock);
@class MWMAlertViewController;
@interface MWMAlert : UIView
@ -9,43 +9,43 @@ using TMWMDownloadBlock = void (^)(storage::TCountriesVec const &, TMWMVoidBlock
@property(weak, nonatomic) MWMAlertViewController * alertController;
+ (MWMAlert *)alert:(routing::IRouter::ResultCode)type;
+ (MWMAlert *)routingMigrationAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)routingMigrationAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (MWMAlert *)downloaderAlertWithAbsentCountries:(storage::TCountriesVec const &)countries
code:(routing::IRouter::ResultCode)code
cancelBlock:(TMWMVoidBlock)cancelBlock
downloadBlock:(TMWMDownloadBlock)downloadBlock
downloadCompleteBlock:(TMWMVoidBlock)downloadCompleteBlock;
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
downloadCompleteBlock:(MWMVoidBlock)downloadCompleteBlock;
+ (MWMAlert *)rateAlert;
+ (MWMAlert *)facebookAlert;
+ (MWMAlert *)locationAlert;
+ (MWMAlert *)routingDisclaimerAlertWithOkBlock:(TMWMVoidBlock)block;
+ (MWMAlert *)routingDisclaimerAlertWithOkBlock:(MWMVoidBlock)block;
+ (MWMAlert *)disabledLocationAlert;
+ (MWMAlert *)noWiFiAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)noWiFiAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (MWMAlert *)noConnectionAlert;
+ (MWMAlert *)migrationProhibitedAlert;
+ (MWMAlert *)deleteMapProhibitedAlert;
+ (MWMAlert *)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)unsavedEditsAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (MWMAlert *)locationServiceNotSupportedAlert;
+ (MWMAlert *)incorrectFeauturePositionAlert;
+ (MWMAlert *)internalErrorAlert;
+ (MWMAlert *)notEnoughSpaceAlert;
+ (MWMAlert *)invalidUserNameOrPasswordAlert;
+ (MWMAlert *)point2PointAlertWithOkBlock:(TMWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (MWMAlert *)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock
cancelBlock:(TMWMVoidBlock)cancelBlock;
+ (MWMAlert *)point2PointAlertWithOkBlock:(MWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (MWMAlert *)disableAutoDownloadAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (MWMAlert *)downloaderNoConnectionAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock;
+ (MWMAlert *)downloaderNotEnoughSpaceAlert;
+ (MWMAlert *)downloaderInternalErrorAlertWithOkBlock:(TMWMVoidBlock)okBlock
cancelBlock:(TMWMVoidBlock)cancelBlock;
+ (MWMAlert *)downloaderNeedUpdateAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)downloaderInternalErrorAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock;
+ (MWMAlert *)downloaderNeedUpdateAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (MWMAlert *)placeDoesntExistAlertWithBlock:(MWMStringBlock)block;
+ (MWMAlert *)resetChangesAlertWithBlock:(TMWMVoidBlock)block;
+ (MWMAlert *)deleteFeatureAlertWithBlock:(TMWMVoidBlock)block;
+ (MWMAlert *)resetChangesAlertWithBlock:(MWMVoidBlock)block;
+ (MWMAlert *)deleteFeatureAlertWithBlock:(MWMVoidBlock)block;
+ (MWMAlert *)editorViralAlert;
+ (MWMAlert *)osmAuthAlert;
+ (MWMAlert *)personalInfoWarningAlertWithBlock:(TMWMVoidBlock)block;
+ (MWMAlert *)trackWarningAlertWithCancelBlock:(TMWMVoidBlock)block;
- (void)close:(TMWMVoidBlock)completion;
+ (MWMAlert *)personalInfoWarningAlertWithBlock:(MWMVoidBlock)block;
+ (MWMAlert *)trackWarningAlertWithCancelBlock:(MWMVoidBlock)block;
- (void)close:(MWMVoidBlock)completion;
- (void)setNeedsCloseAlertAfterEnterBackground;
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation;

View file

@ -16,18 +16,18 @@
+ (MWMAlert *)rateAlert { return [MWMRateAlert alert]; }
+ (MWMAlert *)locationAlert { return [MWMLocationAlert alert]; }
+ (MWMAlert *)facebookAlert { return [MWMFacebookAlert alert]; }
+ (MWMAlert *)point2PointAlertWithOkBlock:(TMWMVoidBlock)block needToRebuild:(BOOL)needToRebuild
+ (MWMAlert *)point2PointAlertWithOkBlock:(MWMVoidBlock)block needToRebuild:(BOOL)needToRebuild
{
return [MWMDefaultAlert point2PointAlertWithOkBlock:block needToRebuild:needToRebuild];
}
+ (MWMAlert *)routingDisclaimerAlertWithOkBlock:(TMWMVoidBlock)block
+ (MWMAlert *)routingDisclaimerAlertWithOkBlock:(MWMVoidBlock)block
{
return [MWMRoutingDisclaimerAlert alertWithOkBlock:block];
}
+ (MWMAlert *)disabledLocationAlert { return [MWMDefaultAlert disabledLocationAlert]; }
+ (MWMAlert *)noWiFiAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (MWMAlert *)noWiFiAlertWithOkBlock:(MWMVoidBlock)okBlock
{
return [MWMDefaultAlert noWiFiAlertWithOkBlock:okBlock];
}
@ -35,7 +35,7 @@
+ (MWMAlert *)noConnectionAlert { return [MWMDefaultAlert noConnectionAlert]; }
+ (MWMAlert *)migrationProhibitedAlert { return [MWMDefaultAlert migrationProhibitedAlert]; }
+ (MWMAlert *)deleteMapProhibitedAlert { return [MWMDefaultAlert deleteMapProhibitedAlert]; }
+ (MWMAlert *)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (MWMAlert *)unsavedEditsAlertWithOkBlock:(MWMVoidBlock)okBlock
{
return [MWMDefaultAlert unsavedEditsAlertWithOkBlock:okBlock];
}
@ -45,16 +45,16 @@
return [MWMDefaultAlert locationServiceNotSupportedAlert];
}
+ (MWMAlert *)routingMigrationAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (MWMAlert *)routingMigrationAlertWithOkBlock:(MWMVoidBlock)okBlock
{
return [MWMDefaultAlert routingMigrationAlertWithOkBlock:okBlock];
}
+ (MWMAlert *)downloaderAlertWithAbsentCountries:(storage::TCountriesVec const &)countries
code:(routing::IRouter::ResultCode)code
cancelBlock:(TMWMVoidBlock)cancelBlock
downloadBlock:(TMWMDownloadBlock)downloadBlock
downloadCompleteBlock:(TMWMVoidBlock)downloadCompleteBlock
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
downloadCompleteBlock:(MWMVoidBlock)downloadCompleteBlock
{
return [MWMDownloadTransitMapAlert downloaderAlertWithMaps:countries
code:code
@ -94,13 +94,13 @@
return [MWMDefaultAlert invalidUserNameOrPasswordAlert];
}
+ (MWMAlert *)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (MWMAlert *)disableAutoDownloadAlertWithOkBlock:(MWMVoidBlock)okBlock
{
return [MWMDefaultAlert disableAutoDownloadAlertWithOkBlock:okBlock];
}
+ (MWMAlert *)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock
cancelBlock:(TMWMVoidBlock)cancelBlock
+ (MWMAlert *)downloaderNoConnectionAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock
{
return [MWMDefaultAlert downloaderNoConnectionAlertWithOkBlock:okBlock cancelBlock:cancelBlock];
}
@ -110,13 +110,13 @@
return [MWMDefaultAlert downloaderNotEnoughSpaceAlert];
}
+ (MWMAlert *)downloaderInternalErrorAlertWithOkBlock:(TMWMVoidBlock)okBlock
cancelBlock:(TMWMVoidBlock)cancelBlock
+ (MWMAlert *)downloaderInternalErrorAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock
{
return [MWMDefaultAlert downloaderInternalErrorAlertWithOkBlock:okBlock cancelBlock:cancelBlock];
}
+ (MWMAlert *)downloaderNeedUpdateAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (MWMAlert *)downloaderNeedUpdateAlertWithOkBlock:(MWMVoidBlock)okBlock
{
return [MWMDefaultAlert downloaderNeedUpdateAlertWithOkBlock:okBlock];
}
@ -126,24 +126,24 @@
return [MWMPlaceDoesntExistAlert alertWithBlock:block];
}
+ (MWMAlert *)resetChangesAlertWithBlock:(TMWMVoidBlock)block
+ (MWMAlert *)resetChangesAlertWithBlock:(MWMVoidBlock)block
{
return [MWMDefaultAlert resetChangesAlertWithBlock:block];
}
+ (MWMAlert *)deleteFeatureAlertWithBlock:(TMWMVoidBlock)block
+ (MWMAlert *)deleteFeatureAlertWithBlock:(MWMVoidBlock)block
{
return [MWMDefaultAlert deleteFeatureAlertWithBlock:block];
}
+ (MWMAlert *)editorViralAlert { return [MWMEditorViralAlert alert]; }
+ (MWMAlert *)osmAuthAlert { return [MWMOsmAuthAlert alert]; }
+ (MWMAlert *)personalInfoWarningAlertWithBlock:(TMWMVoidBlock)block
+ (MWMAlert *)personalInfoWarningAlertWithBlock:(MWMVoidBlock)block
{
return [MWMDefaultAlert personalInfoWarningAlertWithBlock:block];
}
+ (MWMAlert *)trackWarningAlertWithCancelBlock:(TMWMVoidBlock)block
+ (MWMAlert *)trackWarningAlertWithCancelBlock:(MWMVoidBlock)block
{
return [MWMDefaultAlert trackWarningAlertWithCancelBlock:block];
}
@ -153,7 +153,7 @@
// Should override this method if you want custom relayout after rotation.
}
- (void)close:(TMWMVoidBlock)completion { [self.alertController closeAlert:completion]; }
- (void)close:(MWMVoidBlock)completion { [self.alertController closeAlert:completion]; }
- (void)setNeedsCloseAlertAfterEnterBackground
{
[[NSNotificationCenter defaultCenter] addObserver:self

View file

@ -14,22 +14,24 @@
+ (instancetype)noCurrentPositionAlert;
+ (instancetype)pointsInDifferentMWMAlert;
+ (instancetype)disabledLocationAlert;
+ (instancetype)noWiFiAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)noWiFiAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (instancetype)noConnectionAlert;
+ (instancetype)migrationProhibitedAlert;
+ (instancetype)deleteMapProhibitedAlert;
+ (instancetype)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)unsavedEditsAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (instancetype)locationServiceNotSupportedAlert;
+ (instancetype)point2PointAlertWithOkBlock:(TMWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (instancetype)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock cancelBlock:(TMWMVoidBlock)cancelBlock;
+ (instancetype)point2PointAlertWithOkBlock:(MWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (instancetype)disableAutoDownloadAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock;
+ (instancetype)downloaderNotEnoughSpaceAlert;
+ (instancetype)downloaderInternalErrorAlertWithOkBlock:(TMWMVoidBlock)okBlock cancelBlock:(TMWMVoidBlock)cancelBlock;
+ (instancetype)downloaderNeedUpdateAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)routingMigrationAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)resetChangesAlertWithBlock:(TMWMVoidBlock)block;
+ (instancetype)deleteFeatureAlertWithBlock:(TMWMVoidBlock)block;
+ (instancetype)personalInfoWarningAlertWithBlock:(TMWMVoidBlock)block;
+ (instancetype)trackWarningAlertWithCancelBlock:(TMWMVoidBlock)block;
+ (instancetype)downloaderInternalErrorAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock;
+ (instancetype)downloaderNeedUpdateAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (instancetype)routingMigrationAlertWithOkBlock:(MWMVoidBlock)okBlock;
+ (instancetype)resetChangesAlertWithBlock:(MWMVoidBlock)block;
+ (instancetype)deleteFeatureAlertWithBlock:(MWMVoidBlock)block;
+ (instancetype)personalInfoWarningAlertWithBlock:(MWMVoidBlock)block;
+ (instancetype)trackWarningAlertWithCancelBlock:(MWMVoidBlock)block;
@end

View file

@ -18,8 +18,8 @@ static CGFloat const kDividerTopConstant = -8.;
@property(weak, nonatomic) IBOutlet UIButton * leftButton;
@property(weak, nonatomic) IBOutlet UILabel * titleLabel;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * rightButtonWidth;
@property(copy, nonatomic) TMWMVoidBlock leftButtonAction;
@property(copy, nonatomic, readwrite) TMWMVoidBlock rightButtonAction;
@property(copy, nonatomic) MWMVoidBlock leftButtonAction;
@property(copy, nonatomic, readwrite) MWMVoidBlock rightButtonAction;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * dividerTop;
@property(copy, nonatomic) NSString * statisticsEvent;
@ -98,7 +98,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (instancetype)unsavedEditsAlertWithOkBlock:(MWMVoidBlock)okBlock
{
return [self defaultAlertWithTitle:L(@"please_note")
message:L(@"downloader_delete_map_dialog")
@ -108,7 +108,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
statisticsEvent:@"Editor unsaved changes on delete"];
}
+ (instancetype)noWiFiAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (instancetype)noWiFiAlertWithOkBlock:(MWMVoidBlock)okBlock
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"download_over_mobile_header")
message:L(@"download_over_mobile_message")
@ -216,7 +216,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
+ (instancetype)disabledLocationAlert
{
TMWMVoidBlock action = ^{
MWMVoidBlock action = ^{
GetFramework().SwitchMyPositionNextMode();
};
return [self defaultAlertWithTitle:L(@"dialog_routing_location_turn_on")
@ -237,7 +237,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
statisticsEvent:@"Points In Different MWM Alert"];
}
+ (instancetype)point2PointAlertWithOkBlock:(TMWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild
+ (instancetype)point2PointAlertWithOkBlock:(MWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild
{
if (needToRebuild)
{
@ -259,7 +259,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
}
}
+ (instancetype)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (instancetype)disableAutoDownloadAlertWithOkBlock:(MWMVoidBlock)okBlock
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"disable_auto_download")
message:nil
@ -271,7 +271,8 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock cancelBlock:(TMWMVoidBlock)cancelBlock
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock
{
MWMDefaultAlert * alert =
[self defaultAlertWithTitle:L(@"downloader_status_failed")
@ -297,7 +298,8 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)downloaderInternalErrorAlertWithOkBlock:(TMWMVoidBlock)okBlock cancelBlock:(TMWMVoidBlock)cancelBlock
+ (instancetype)downloaderInternalErrorAlertWithOkBlock:(MWMVoidBlock)okBlock
cancelBlock:(MWMVoidBlock)cancelBlock
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"migration_download_error_dialog")
message:nil
@ -310,7 +312,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)downloaderNeedUpdateAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (instancetype)downloaderNeedUpdateAlertWithOkBlock:(MWMVoidBlock)okBlock
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"downloader_need_update_title")
message:L(@"downloader_need_update_message")
@ -322,7 +324,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)routingMigrationAlertWithOkBlock:(TMWMVoidBlock)okBlock
+ (instancetype)routingMigrationAlertWithOkBlock:(MWMVoidBlock)okBlock
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"downloader_update_maps")
message:L(@"downloader_mwm_migration_dialog")
@ -333,7 +335,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)resetChangesAlertWithBlock:(TMWMVoidBlock)block
+ (instancetype)resetChangesAlertWithBlock:(MWMVoidBlock)block
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"editor_reset_edits_message")
message:nil
@ -344,7 +346,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)deleteFeatureAlertWithBlock:(TMWMVoidBlock)block
+ (instancetype)deleteFeatureAlertWithBlock:(MWMVoidBlock)block
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"editor_remove_place_message")
message:nil
@ -355,7 +357,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)personalInfoWarningAlertWithBlock:(TMWMVoidBlock)block
+ (instancetype)personalInfoWarningAlertWithBlock:(MWMVoidBlock)block
{
NSString * message = [NSString stringWithFormat:@"%@\n%@", L(@"editor_share_to_all_dialog_message_1"), L(@"editor_share_to_all_dialog_message_2")];
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"editor_share_to_all_dialog_title")
@ -367,7 +369,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
+ (instancetype)trackWarningAlertWithCancelBlock:(TMWMVoidBlock)block
+ (instancetype)trackWarningAlertWithCancelBlock:(MWMVoidBlock)block
{
MWMDefaultAlert * alert = [self defaultAlertWithTitle:L(@"recent_track_background_dialog_title")
message:L(@"recent_track_background_dialog_message")
@ -382,7 +384,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
message:(nullable NSString *)message
rightButtonTitle:(nonnull NSString *)rightButtonTitle
leftButtonTitle:(nullable NSString *)leftButtonTitle
rightButtonAction:(nullable TMWMVoidBlock)action
rightButtonAction:(nullable MWMVoidBlock)action
statisticsEvent:(nonnull NSString *)statisticsEvent
{
[Statistics logEvent:statisticsEvent withParameters:@{kStatAction : kStatOpen}];

View file

@ -6,9 +6,9 @@
message:(nullable NSString *)message
rightButtonTitle:(nonnull NSString *)rightButtonTitle
leftButtonTitle:(nullable NSString *)leftButtonTitle
rightButtonAction:(nullable TMWMVoidBlock)action
rightButtonAction:(nullable MWMVoidBlock)action
statisticsEvent:(nonnull NSString *)statisticsEvent;
@property(copy, nonatomic, readonly, nullable) TMWMVoidBlock rightButtonAction;
@property(copy, nonatomic, readonly, nullable) MWMVoidBlock rightButtonAction;
@end

View file

@ -6,9 +6,9 @@
+ (instancetype)downloaderAlertWithMaps:(storage::TCountriesVec const &)countries
code:(routing::IRouter::ResultCode)code
cancelBlock:(TMWMVoidBlock)cancelBlock
downloadBlock:(TMWMDownloadBlock)downloadBlock
downloadCompleteBlock:(TMWMVoidBlock)downloadCompleteBlock;
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
downloadCompleteBlock:(MWMVoidBlock)downloadCompleteBlock;
- (void)showDownloadDetail:(UIButton *)sender;
@end

View file

@ -25,9 +25,9 @@ CGFloat const kAnimationDuration = .05;
@interface MWMDownloadTransitMapAlert () <UITableViewDataSource, UITableViewDelegate, MWMFrameworkStorageObserver, MWMCircularProgressProtocol>
@property (copy, nonatomic) TMWMVoidBlock cancelBlock;
@property (copy, nonatomic) TMWMDownloadBlock downloadBlock;
@property (copy, nonatomic) TMWMVoidBlock downloadCompleteBlock;
@property(copy, nonatomic) MWMVoidBlock cancelBlock;
@property(copy, nonatomic) MWMDownloadBlock downloadBlock;
@property(copy, nonatomic) MWMVoidBlock downloadCompleteBlock;
@property (nonatomic) MWMCircularProgress * progress;
@ -59,9 +59,9 @@ CGFloat const kAnimationDuration = .05;
+ (instancetype)downloaderAlertWithMaps:(storage::TCountriesVec const &)countries
code:(routing::IRouter::ResultCode)code
cancelBlock:(TMWMVoidBlock)cancelBlock
downloadBlock:(TMWMDownloadBlock)downloadBlock
downloadCompleteBlock:(TMWMVoidBlock)downloadCompleteBlock
cancelBlock:(MWMVoidBlock)cancelBlock
downloadBlock:(MWMDownloadBlock)downloadBlock
downloadCompleteBlock:(MWMVoidBlock)downloadCompleteBlock
{
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
MWMDownloadTransitMapAlert * alert = [self alertWithCountries:countries];
@ -285,7 +285,7 @@ CGFloat const kAnimationDuration = .05;
[self invalidateTableConstraintWithHeight:height];
}
- (void)close:(TMWMVoidBlock)completion
- (void)close:(MWMVoidBlock)completion
{
[MWMFrameworkListener removeObserver:self];
[super close:completion];

View file

@ -2,6 +2,6 @@
@interface MWMLocationNotFoundAlert : MWMDefaultAlert
+ (instancetype)alertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)alertWithOkBlock:(MWMVoidBlock)okBlock;
@end

View file

@ -9,7 +9,7 @@
@implementation MWMLocationNotFoundAlert
+ (instancetype)alertWithOkBlock:(TMWMVoidBlock)okBlock
+ (instancetype)alertWithOkBlock:(MWMVoidBlock)okBlock
{
MWMLocationNotFoundAlert * alert =
[self defaultAlertWithTitle:L(@"current_location_unknown_title")

View file

@ -2,6 +2,6 @@
@interface MWMMobileInternetAlert : MWMAlert
+ (nonnull instancetype)alertWithBlock:(nonnull TMWMVoidBlock)block;
+ (nonnull instancetype)alertWithBlock:(nonnull MWMVoidBlock)block;
@end

View file

@ -12,13 +12,13 @@ NSString * const kStatisticsEvent = @"Mobile Internet Settings Alert";
@interface MWMMobileInternetAlert ()
@property(copy, nonatomic) TMWMVoidBlock completionBlock;
@property(copy, nonatomic) MWMVoidBlock completionBlock;
@end
@implementation MWMMobileInternetAlert
+ (nonnull instancetype)alertWithBlock:(nonnull TMWMVoidBlock)block
+ (nonnull instancetype)alertWithBlock:(nonnull MWMVoidBlock)block
{
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
MWMMobileInternetAlert * alert =

View file

@ -2,6 +2,6 @@
@interface MWMRoutingDisclaimerAlert : MWMAlert
+ (instancetype)alertWithOkBlock:(TMWMVoidBlock)block;
+ (instancetype)alertWithOkBlock:(MWMVoidBlock)block;
@end

View file

@ -10,13 +10,13 @@ static NSString * const kStatisticsEvent = @"Routing Disclaimer Alert";
@property(weak, nonatomic) IBOutlet UITextView * textView;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * textViewHeight;
@property(copy, nonatomic) TMWMVoidBlock okBlock;
@property(copy, nonatomic) MWMVoidBlock okBlock;
@end
@implementation MWMRoutingDisclaimerAlert
+ (instancetype)alertWithOkBlock:(TMWMVoidBlock)block
+ (instancetype)alertWithOkBlock:(MWMVoidBlock)block
{
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
MWMRoutingDisclaimerAlert * alert =

View file

@ -105,7 +105,7 @@ using namespace osm_auth_ios;
#pragma mark - Actions
- (void)performOnlineAction:(TMWMVoidBlock)block
- (void)performOnlineAction:(MWMVoidBlock)block
{
if (Platform::IsConnected())
block();

View file

@ -13,7 +13,7 @@
- (void)requestTaxiFrom:(MWMRoutePoint *)from
to:(MWMRoutePoint *)to
completion:(TMWMVoidBlock)completion
completion:(MWMVoidBlock)completion
failure:(MWMStringBlock)failure;
- (NSURL *)taxiURL;

View file

@ -99,7 +99,7 @@ using namespace uber;
- (void)requestTaxiFrom:(MWMRoutePoint *)from
to:(MWMRoutePoint *)to
completion:(TMWMVoidBlock)completion
completion:(MWMVoidBlock)completion
failure:(MWMStringBlock)failure
{
NSAssert(completion && failure, @"Completion and failure blocks must be not nil!");

View file

@ -404,7 +404,7 @@ using namespace osm_auth_ios;
}
});
};
auto const runFetchTask = ^(TMWMVoidBlock task) {
auto const runFetchTask = ^(MWMVoidBlock task) {
++fetchRunningTasks;
task();
};

View file

@ -1,4 +1,4 @@
typedef void (^TMWMVoidBlock)();
typedef void (^MWMVoidBlock)();
typedef void (^MWMStringBlock)(NSString *);
typedef NS_ENUM(NSUInteger, MWMDayTime) { MWMDayTimeDay, MWMDayTimeNight };

View file

@ -437,7 +437,7 @@ bool isMarkerPoint(MWMRoutePoint * point) { return point.isValid && !point.isMyP
if (code != routing::IRouter::NeedMoreMaps)
[[[self class] router] stop];
}
downloadBlock:^(storage::TCountriesVec const & downloadCountries, TMWMVoidBlock onSuccess) {
downloadBlock:^(storage::TCountriesVec const & downloadCountries, MWMVoidBlock onSuccess) {
[MWMStorage downloadNodes:downloadCountries
onSuccess:onSuccess];
}

View file

@ -4,13 +4,13 @@
@interface MWMStorage : NSObject
+ (void)downloadNode:(storage::TCountryId const &)countryId onSuccess:(TMWMVoidBlock)onSuccess;
+ (void)downloadNode:(storage::TCountryId const &)countryId onSuccess:(MWMVoidBlock)onSuccess;
+ (void)retryDownloadNode:(storage::TCountryId const &)countryId;
+ (void)updateNode:(storage::TCountryId const &)countryId;
+ (void)deleteNode:(storage::TCountryId const &)countryId;
+ (void)cancelDownloadNode:(storage::TCountryId const &)countryId;
+ (void)showNode:(storage::TCountryId const &)countryId;
+ (void)downloadNodes:(storage::TCountriesVec const &)countryIds onSuccess:(TMWMVoidBlock)onSuccess;
+ (void)downloadNodes:(storage::TCountriesVec const &)countryIds onSuccess:(MWMVoidBlock)onSuccess;
@end

View file

@ -11,8 +11,7 @@ using namespace storage;
@implementation MWMStorage
+ (void)downloadNode:(TCountryId const &)countryId
onSuccess:(TMWMVoidBlock)onSuccess
+ (void)downloadNode:(TCountryId const &)countryId onSuccess:(MWMVoidBlock)onSuccess
{
if (IsEnoughSpaceForDownload(countryId, GetFramework().GetStorage()))
{
@ -80,9 +79,7 @@ using namespace storage;
{
GetFramework().ShowNode(countryId);
}
+ (void)downloadNodes:(TCountriesVec const &)countryIds
onSuccess:(TMWMVoidBlock)onSuccess
+ (void)downloadNodes:(TCountriesVec const &)countryIds onSuccess:(MWMVoidBlock)onSuccess
{
TMwmSize requiredSize = accumulate(countryIds.begin(), countryIds.end(), kMaxMwmSizeBytes,
[](size_t const & size, TCountryId const & countryId)
@ -107,7 +104,7 @@ using namespace storage;
}
}
+ (void)checkConnectionAndPerformAction:(TMWMVoidBlock)action
+ (void)checkConnectionAndPerformAction:(MWMVoidBlock)action
{
switch (Platform::ConnectionStatus())
{

View file

@ -1,6 +1,6 @@
@interface MWMEditorAdditionalNamesHeader : UIView
+ (instancetype)header:(TMWMVoidBlock)toggleBlock;
+ (instancetype)header:(MWMVoidBlock)toggleBlock;
- (void)setShowAdditionalNames:(BOOL)showAdditionalNames;
- (void)setAdditionalNamesVisible:(BOOL)visible;

View file

@ -5,14 +5,14 @@
@interface MWMEditorAdditionalNamesHeader ()
@property (weak, nonatomic) IBOutlet UILabel * label;
@property (copy, nonatomic) TMWMVoidBlock toggleBlock;
@property(copy, nonatomic) MWMVoidBlock toggleBlock;
@property (weak, nonatomic) IBOutlet MWMButton * toggleButton;
@end
@implementation MWMEditorAdditionalNamesHeader
+ (instancetype)header:(TMWMVoidBlock)toggleBlock
+ (instancetype)header:(MWMVoidBlock)toggleBlock
{
MWMEditorAdditionalNamesHeader * h = [[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil]
firstObject];

View file

@ -22,7 +22,7 @@ using namespace storage;
@interface MWMStorage ()
+ (void)checkConnectionAndPerformAction:(TMWMVoidBlock)action;
+ (void)checkConnectionAndPerformAction:(MWMVoidBlock)action;
@end

View file

@ -73,7 +73,7 @@ using MWMPlacePageCellTypeValueMap = map<MWMPlacePageCellType, string>;
- (instancetype)initWithInfo:(place_page::Info const &)info;
- (void)synchronize;
- (void)onlinePricingWithCompletionBlock:(TMWMVoidBlock)completion failure:(TMWMVoidBlock)failure;
- (void)onlinePricingWithCompletionBlock:(MWMVoidBlock)completion failure:(MWMVoidBlock)failure;
- (void)toggleCoordinateSystem;

View file

@ -118,7 +118,7 @@ void initFieldsMap()
}
}
- (void)onlinePricingWithCompletionBlock:(TMWMVoidBlock)completion failure:(TMWMVoidBlock)failure
- (void)onlinePricingWithCompletionBlock:(MWMVoidBlock)completion failure:(MWMVoidBlock)failure
{
if (Platform::ConnectionStatus() == Platform::EConnectionType::CONNECTION_NONE || !self.isBooking)
{

View file

@ -77,7 +77,7 @@ CGFloat const kLineSpacing = 5;
}];
}
- (void)downloadAssingImageWithURL:(NSURL *)URL completion:(TMWMVoidBlock)completion
- (void)downloadAssingImageWithURL:(NSURL *)URL completion:(MWMVoidBlock)completion
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData * data = [NSData dataWithContentsOfURL:URL];

View file

@ -20,7 +20,7 @@
@property(weak, nonatomic) IBOutlet UILabel * text;
@property(weak, nonatomic) IBOutlet UIImageView * arrowIcon;
@property(copy, nonatomic) TMWMVoidBlock tapAction;
@property(copy, nonatomic) MWMVoidBlock tapAction;
@end

View file

@ -5,7 +5,7 @@ namespace place_page_layout
{
NSTimeInterval const kAnimationSpeed = IPAD ? 0.15 : 0.25;
inline void animate(TMWMVoidBlock animate, TMWMVoidBlock completion = nil)
inline void animate(MWMVoidBlock animate, MWMVoidBlock completion = nil)
{
[UIView animateWithDuration:kAnimationSpeed
delay:0

View file

@ -17,7 +17,7 @@
@property(weak, nonatomic) IBOutlet UIImageView * compass;
@property(weak, nonatomic) IBOutlet UIView * distanceView;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * trailing;
@property(copy, nonatomic) TMWMVoidBlock tapOnDistance;
@property(copy, nonatomic) MWMVoidBlock tapOnDistance;
@end

View file

@ -333,7 +333,7 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerActionBarState) {
}
}
- (void)animateConstraints:(TMWMVoidBlock)block
- (void)animateConstraints:(MWMVoidBlock)block
{
UIView * parentView = self.ownerController.view;
[parentView layoutIfNeeded];