1
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#import "KBKeyboardSubscriptionView.h"
|
||||
#import "KBLocalizationManager.h"
|
||||
#import "KBSkinManager.h"
|
||||
#import "KBSkinInstallBridge.h"
|
||||
#import "KBSuggestionEngine.h"
|
||||
#import "KBKeyboardLayoutResolver.h"
|
||||
#import <SDWebImage/SDWebImage.h>
|
||||
@@ -254,10 +255,9 @@ static NSString *KBFormatMB(uint64_t bytes) {
|
||||
- (void)kb_checkAndApplyLayoutIfNeeded {
|
||||
NSString *currentProfileId = [[KBKeyboardLayoutResolver sharedResolver] currentProfileId];
|
||||
if (currentProfileId.length == 0) {
|
||||
currentProfileId = @"en_US_qwerty"; // 默认回退
|
||||
currentProfileId = @"en_US_qwerty";
|
||||
}
|
||||
|
||||
// 如果 profileId 没有变化,不需要重新加载
|
||||
if ([currentProfileId isEqualToString:_kb_lastLoadedProfileId]) {
|
||||
return;
|
||||
}
|
||||
@@ -265,16 +265,20 @@ static NSString *KBFormatMB(uint64_t bytes) {
|
||||
NSLog(@"[KeyboardViewController] Detected profileId change: %@ -> %@", _kb_lastLoadedProfileId, currentProfileId);
|
||||
_kb_lastLoadedProfileId = currentProfileId;
|
||||
|
||||
// 通知 KBKeyBoardMainView 切换布局
|
||||
if (self.keyBoardMainView && [self.keyBoardMainView respondsToSelector:@selector(reloadLayoutWithProfileId:)]) {
|
||||
[self.keyBoardMainView performSelector:@selector(reloadLayoutWithProfileId:) withObject:currentProfileId];
|
||||
}
|
||||
|
||||
// 更新联想引擎类型
|
||||
NSString *suggestionEngine = [[KBKeyboardLayoutResolver sharedResolver] suggestionEngineForProfileId:currentProfileId];
|
||||
if (suggestionEngine.length > 0) {
|
||||
[self kb_updateSuggestionEngineType:suggestionEngine];
|
||||
}
|
||||
|
||||
NSString *languageCode = [[KBKeyboardLayoutResolver sharedResolver] currentLanguageCode];
|
||||
if (languageCode.length > 0) {
|
||||
NSLog(@"[KeyboardViewController] Reloading skin icon map for language: %@", languageCode);
|
||||
[KBSkinInstallBridge reloadCurrentSkinIconMapForLanguageCode:languageCode];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)kb_updateSuggestionEngineType:(NSString *)engineType {
|
||||
|
||||
@@ -97,9 +97,11 @@
|
||||
"letter_l_upper" = "key_l_up";
|
||||
|
||||
/* 字母 ñ(小写)- 西班牙语专用 */
|
||||
"letter_ñ_lower" = "key_n_tilde";
|
||||
"letter_ñ_lower" = "key_ñ";
|
||||
/* 字母 Ñ(大写)- 西班牙语专用 */
|
||||
"letter_ñ_upper" = "key_n_tilde_up";
|
||||
"letter_ñ_upper" = "key_ñ_up";
|
||||
/* 字母 ñ(基础映射) */
|
||||
"letter_ñ" = "key_ñ";
|
||||
|
||||
/* 字母 z(小写) */
|
||||
"letter_z_lower" = "key_z";
|
||||
|
||||
Reference in New Issue
Block a user