This commit is contained in:
2026-03-08 21:29:10 +08:00
parent 9fb2e2e694
commit c1ace5f53e
34 changed files with 870 additions and 1930 deletions

View File

@@ -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 {