[ios] Added skip auto download dialog.

This commit is contained in:
Ilya Grechuhin 2016-03-10 12:15:06 +03:00 committed by Sergey Yershov
parent 0ed5e188cd
commit e915129c9f
6 changed files with 25 additions and 0 deletions

View file

@ -27,6 +27,7 @@
- (void)presentIncorrectFeauturePositionAlert;
- (void)presentInternalErrorAlert;
- (void)presentInvalidUserNameOrPasswordAlert;
- (void)presentDisableAutoDownloadAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentDownloaderNoConnectionAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentDownloaderNotEnoughSpaceAlert;
- (void)presentDownloaderInternalErrorAlertForMap:(nonnull NSString *)name okBlock:(nonnull TMWMVoidBlock)okBlock;

View file

@ -153,6 +153,11 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
}];
}
- (void)presentDisableAutoDownloadAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert disableAutoDownloadAlertWithOkBlock:okBlock]];
}
- (void)presentDownloaderNoConnectionAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert downloaderNoConnectionAlertWithOkBlock:okBlock]];

View file

@ -24,6 +24,7 @@
+ (MWMAlert *)internalErrorAlert;
+ (MWMAlert *)invalidUserNameOrPasswordAlert;
+ (MWMAlert *)point2PointAlertWithOkBlock:(TMWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (MWMAlert *)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)downloaderNotEnoughSpaceAlert;
+ (MWMAlert *)downloaderInternalErrorAlertForMap:(NSString *)name okBlock:(TMWMVoidBlock)okBlock;

View file

@ -116,6 +116,11 @@
return [MWMDefaultAlert invalidUserNameOrPasswordAlert];
}
+ (MWMAlert *)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock
{
return [MWMDefaultAlert disableAutoDownloadAlertWithOkBlock:okBlock];
}
+ (MWMAlert *)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock
{
return [MWMDefaultAlert downloaderNoConnectionAlertWithOkBlock:okBlock];

View file

@ -18,6 +18,7 @@
+ (instancetype)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)locationServiceNotSupportedAlert;
+ (instancetype)point2PointAlertWithOkBlock:(TMWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (instancetype)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)downloaderNotEnoughSpaceAlert;
+ (instancetype)downloaderInternalErrorAlertForMap:(NSString *)name okBlock:(TMWMVoidBlock)okBlock;

View file

@ -222,6 +222,18 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
}
}
+ (instancetype)disableAutoDownloadAlertWithOkBlock:(TMWMVoidBlock)okBlock
{
kStatisticsEvent = @"Disable Auto Download Alert";
MWMDefaultAlert * alert = [self defaultAlertWithTitle:@"disable_auto_download"
message:nil
rightButtonTitle:@"_disable"
leftButtonTitle:@"cancel"
rightButtonAction:okBlock];
[alert setNeedsCloseAlertAfterEnterBackground];
return alert;
}
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock
{
kStatisticsEvent = @"Downloader No Connection Alert";