优化下载皮肤❤️
This commit is contained in:
@@ -42,6 +42,13 @@
|
||||
if (completion) completion(NO);
|
||||
return;
|
||||
}
|
||||
BOOL forceDownload = NO;
|
||||
id forceValue = skinJSON[@"force_download"];
|
||||
if ([forceValue respondsToSelector:@selector(boolValue)]) {
|
||||
forceDownload = [forceValue boolValue];
|
||||
}
|
||||
NSLog(@"🧩[SkinService] apply mode=%lu id=%@ force=%d",
|
||||
(unsigned long)mode, skinJSON[@"id"], forceDownload);
|
||||
|
||||
// // 1. 点击应用皮肤时,检查键盘启用 & 完全访问状态,并尽量给出友好提示。
|
||||
// KBKeyboardPermissionManager *perm = [KBKeyboardPermissionManager shared];
|
||||
|
||||
@@ -242,6 +242,7 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
|
||||
[KBHUD showInfo:KBLocalized(@"正在加载主题详情")];
|
||||
return;
|
||||
}
|
||||
NSLog(@"🧩[SkinDetail] action themeId=%@ purchased=%d", self.themeId, self.detailModel.isPurchased);
|
||||
if (self.detailModel.isPurchased) {
|
||||
[self requestDownload];
|
||||
} else {
|
||||
@@ -287,11 +288,17 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
|
||||
if (self.detailModel.themePreviewImageUrl.length > 0) {
|
||||
skin[@"preview"] = self.detailModel.themePreviewImageUrl;
|
||||
}
|
||||
skin[@"force_download"] = @(YES);
|
||||
NSLog(@"⬇️[SkinDetail] download request id=%@ zip=%@ force=YES",
|
||||
skin[@"id"], skin[@"zip_url"]);
|
||||
[KBHUD showWithStatus:@"正在下载..."];
|
||||
[[KBSkinService shared] applySkinWithJSON:skin
|
||||
fromViewController:self
|
||||
mode:KBSkinSourceModeRemoteZip
|
||||
completion:^(BOOL success) {
|
||||
completion:^(BOOL success) {
|
||||
NSLog(@"%@[SkinDetail] download result id=%@",
|
||||
(success ? @"✅" : @"❌"),
|
||||
self.detailModel.themeId);
|
||||
if (success) {
|
||||
NSString *themeId = self.detailModel.themeId;
|
||||
if (themeId.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user