From 11b835460b59872767efc6d15ed18248f9fda843 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Wed, 8 Nov 2023 15:22:13 +0800 Subject: [PATCH] alert success only if migrated --- src/app.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 0be193c..73e015e 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -153,9 +153,11 @@ export function App() { keyCount += 1; } setSelectedChatIndex(keyCount); - alert( - "v2.0.0 Update: Imported chat history from localStorage to indexedDB. 🎉" - ); + if (keyCount > 0) { + alert( + "v2.0.0 Update: Imported chat history from localStorage to indexedDB. 🎉" + ); + } }, });