mirror of
https://github.com/purocean/yn.git
synced 2026-08-31 01:55:43 +08:00
fix(editor): remove floating hint key migration
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user