Remove localstorage setting migration

This commit is contained in:
Cohee
2024-09-03 14:05:27 +00:00
parent fd75071b09
commit fa054520b6

View File

@ -299,7 +299,6 @@ export let context_presets = [];
const storage_keys = { const storage_keys = {
auto_connect_legacy: 'AutoConnectEnabled', auto_connect_legacy: 'AutoConnectEnabled',
auto_load_chat_legacy: 'AutoLoadChatEnabled', auto_load_chat_legacy: 'AutoLoadChatEnabled',
hideChatAvatars_legacy: 'hideChatAvatarsEnabled',
storyStringValidationCache: 'StoryStringValidationCache', storyStringValidationCache: 'StoryStringValidationCache',
}; };
@ -1415,7 +1414,6 @@ async function loadPowerUserSettings(settings, data) {
// These are still local storage. Delete in 1.12.7 // These are still local storage. Delete in 1.12.7
const autoLoadChat = localStorage.getItem(storage_keys.auto_load_chat_legacy); const autoLoadChat = localStorage.getItem(storage_keys.auto_load_chat_legacy);
const autoConnect = localStorage.getItem(storage_keys.auto_connect_legacy); const autoConnect = localStorage.getItem(storage_keys.auto_connect_legacy);
const hideChatAvatars = localStorage.getItem(storage_keys.hideChatAvatars_legacy);
if (autoLoadChat) { if (autoLoadChat) {
power_user.auto_load_chat = autoLoadChat === 'true'; power_user.auto_load_chat = autoLoadChat === 'true';
@ -1427,11 +1425,6 @@ async function loadPowerUserSettings(settings, data) {
localStorage.removeItem(storage_keys.auto_connect_legacy); localStorage.removeItem(storage_keys.auto_connect_legacy);
} }
if (hideChatAvatars) {
power_user.hideChatAvatars_enabled = hideChatAvatars === 'true';
localStorage.removeItem(storage_keys.hideChatAvatars_legacy);
}
if (power_user.chat_display === '') { if (power_user.chat_display === '') {
power_user.chat_display = chat_styles.DEFAULT; power_user.chat_display = chat_styles.DEFAULT;
} }