From 06f257d3bbcb8d9ece348dd5318d8071b2ea5272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Wed, 8 Nov 2023 20:49:13 +0000 Subject: [PATCH] fix: fix bad refactor --- src/features/settings/panels/PanelQMCv2Key.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/settings/panels/PanelQMCv2Key.tsx b/src/features/settings/panels/PanelQMCv2Key.tsx index 5f59502..6b37517 100644 --- a/src/features/settings/panels/PanelQMCv2Key.tsx +++ b/src/features/settings/panels/PanelQMCv2Key.tsx @@ -29,7 +29,7 @@ import { InfoOutlineIcon } from '@chakra-ui/icons'; import { ImportSecretModal } from '~/components/ImportSecretModal'; import { StagingQMCv2Key } from '../keyFormats'; import { DatabaseKeyExtractor } from '~/util/DatabaseKeyExtractor'; -import { MMKVParser } from '~/util/MMKVParser'; +import { parseAndroidQmEKey } from '~/util/mmkv/qm'; import { getFileName } from '~/util/pathHelper'; import { QMCv2QQMusicAllInstructions } from './QMCv2/QMCv2QQMusicAllInstructions'; import { QMCv2DoubanAllInstructions } from './QMCv2/QMCv2DoubanAllInstructions'; @@ -63,7 +63,7 @@ export function PanelQMCv2Key() { } } else if (/MMKVStreamEncryptId|filenameEkeyMap/i.test(file.name)) { const fileBuffer = await file.arrayBuffer(); - const map = MMKVParser.toStringMap(new DataView(fileBuffer)); + const map = parseAndroidQmEKey(new DataView(fileBuffer)); qmc2Keys = Array.from(map.entries(), ([name, ekey]) => ({ name: getFileName(name), ekey })); }