Skip to content

Commit

Permalink
fix: detectSnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Jun 26, 2024
1 parent 123d6c6 commit 9ce3437
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/views/ImportPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="tsx">
import { loadingBar, message } from '@/utils/discrete';
import { detectSnapshot } from '@/utils/export';
import { gmOk } from '@/utils/gm';
import { importFromNetwork } from '@/utils/import';
import { delay, filterQuery } from '@/utils/others';
Expand Down Expand Up @@ -52,10 +53,9 @@ onMounted(async () => {
loadingBar.finish();
const snapshot = result.value;
if (snapshot?.id) {
if (importId) {
urlStorage[importId] = snapshot.id;
importStorage[snapshot.id] = importId;
}
detectSnapshot(importId);
urlStorage[importId] = snapshot.id;
importStorage[snapshot.id] = importId;
loading.value = false;
await delay(500);
goToSnapshot(snapshot.id);
Expand Down
7 changes: 0 additions & 7 deletions src/views/SnapshotPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { useRoute, useRouter } from 'vue-router';
import { useTitle } from '@vueuse/core';
import { gmOk } from '@/utils/gm';
import {
detectSnapshot,
exportSnapshotAsJpgUrl,
exportSnapshotAsImportId,
} from '@/utils/export';
Expand Down Expand Up @@ -77,12 +76,6 @@ onMounted(async () => {
message.error(`快照数据缺失`);
return;
}
setTimeout(() => {
const importId = importStorage[localSnapshot.id];
if (importId) {
detectSnapshot(importId);
}
}, 1000);
if (gmOk() && settingsStorage.autoUploadImport) {
// 静默生成 jpg/zip
setTimeout(async () => {
Expand Down

0 comments on commit 9ce3437

Please sign in to comment.