fix(editor): remove floating hint key migration

This commit is contained in:
purocean
2026-05-02 12:01:58 +08:00
parent 92c214b0dc
commit 4f2d20bf67
+1 -14
View File
@@ -22,7 +22,6 @@ const MIN_HEIGHT = 220
const DEFAULT_HEIGHT = MIN_HEIGHT
const SIDE_MARGIN = 24
const SCREEN_MARGIN = 8
const LEGACY_HINT_STORAGE_KEY = 'floating-editor.preview-hint-count'
const HINT_STORAGE_KEY = 'plugin.floating-editor.preview-hint-count'
const HINT_LIMIT = 3
const HINT_DURATION = 5000
@@ -136,19 +135,7 @@ export default {
}
function getHintCount () {
const count = ctx.storage.get<number>(HINT_STORAGE_KEY)
if (typeof count === 'number') {
return count
}
const legacyCount = ctx.storage.get<number>(LEGACY_HINT_STORAGE_KEY)
if (typeof legacyCount === 'number') {
ctx.storage.set(HINT_STORAGE_KEY, legacyCount)
ctx.storage.remove(LEGACY_HINT_STORAGE_KEY)
return legacyCount
}
return 0
return ctx.storage.get(HINT_STORAGE_KEY, 0)
}
function setHintCount (count: number) {