1
This commit is contained in:
@@ -351,7 +351,6 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
||||
return;
|
||||
}
|
||||
NSString *targetId = [self kb_defaultSkinIdForCurrentStyle];
|
||||
NSString *targetZip = [self kb_defaultSkinZipNameForCurrentStyle];
|
||||
if (currentId.length > 0 && [currentId isEqualToString:targetId]) {
|
||||
return;
|
||||
}
|
||||
@@ -360,17 +359,12 @@ static void KBSkinInstallNotificationCallback(CFNotificationCenterRef center,
|
||||
if ([KBSkinInstallBridge applyInstalledSkinWithId:targetId error:&applyError]) {
|
||||
return;
|
||||
}
|
||||
|
||||
[KBSkinInstallBridge publishBundleSkinRequestWithId:targetId
|
||||
name:targetId
|
||||
zipName:targetZip
|
||||
iconShortNames:nil];
|
||||
[KBSkinInstallBridge
|
||||
consumePendingRequestFromBundle:NSBundle.mainBundle
|
||||
completion:^(__unused BOOL success,
|
||||
__unused NSError *_Nullable error) {
|
||||
// 已通过通知触发主题刷新,这里无需额外处理
|
||||
}];
|
||||
// 默认皮肤 zip 仅由主 App 持有并解压。扩展侧不再尝试从自身 bundle 解压。
|
||||
// 若主 App 尚未安装对应默认皮肤,这里仅保留当前主题,避免“找不到 zip”报错。
|
||||
if (applyError) {
|
||||
NSLog(@"[Keyboard] default skin %@ not installed in AppGroup yet: %@",
|
||||
targetId, applyError);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user