fix: incompatibility with old data causes app to crash

This commit is contained in:
molvqingtai 2024-10-29 22:17:16 +08:00
parent d44bceb7a8
commit bd07bdc2c3

View file

@ -1,3 +1,4 @@
import { version } from '@/../package.json'
// https://www.webfx.com/tools/emoji-cheat-sheet/
export const EMOJI_LIST = [
@ -185,12 +186,12 @@ export const BREAKPOINTS = {
export const MESSAGE_MAX_LENGTH = 500 as const
export const STORAGE_NAME = 'WEB_CHAT' as const
export const MESSAGE_LIST_STORAGE_KEY = 'WEB_CHAT_MESSAGE_LIST' as const
export const STORAGE_NAME = `WEB_CHAT_${version}` as const
export const USER_INFO_STORAGE_KEY = 'WEB_CHAT_USER_INFO' as const
export const MESSAGE_LIST_STORAGE_KEY = 'WEB_CHAT_MESSAGE_LIST' as const
export const APP_STATUS_STORAGE_KEY = 'WEB_CHAT_APP_STATUS' as const
/**
* In chrome storage.sync, each key-value pair supports a maximum storage of 8kb