1
This commit is contained in:
@@ -76,6 +76,31 @@
|
||||
[self kb_openRechargeForProduct:product];
|
||||
}
|
||||
|
||||
- (void)subscriptionViewDidTapAgreement:(KBKeyboardSubscriptionView *)view {
|
||||
(void)view;
|
||||
[self hideSubscriptionPanel];
|
||||
NSString *query = [NSString stringWithFormat:@"type=%@&src=keyboard",
|
||||
@"membership"];
|
||||
NSString *ulString = [NSString stringWithFormat:@"%@?%@", KB_UL_LEGAL, query];
|
||||
NSString *schemeString =
|
||||
[NSString stringWithFormat:@"%@://legal?%@", KB_APP_SCHEME, query];
|
||||
NSURL *ul = [NSURL URLWithString:ulString];
|
||||
NSURL *scheme = [NSURL URLWithString:schemeString];
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[KBExtensionAppLauncher openPrimaryURL:ul
|
||||
fallbackURL:scheme
|
||||
usingInputController:self
|
||||
source:(self.view ?: (UIResponder *)weakSelf)
|
||||
completion:^(BOOL success) {
|
||||
if (success) {
|
||||
return;
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[KBHUD showInfo:KBLocalized(@"Please open the App to view the agreement")];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (void)kb_openRechargeForProduct:(KBKeyboardSubscriptionProduct *)product {
|
||||
|
||||
Reference in New Issue
Block a user