From fc61cc96f236cf025a35445f2de9a687da48523e Mon Sep 17 00:00:00 2001 From: houchengqiu Date: Wed, 24 Jul 2024 16:48:45 +0800 Subject: [PATCH] fix: Resolve the issue of floating prompts popping up multiple times due to import failure Resolve the issue of floating prompts popping up multiple times due to import failure Log: Resolve the issue of floating prompts popping up multiple times due to import failure Bug: https://pms.uniontech.com/bug-view-192991.html --- src/qml/GlobalVar.qml | 3 ++- src/qml/MainAlbumView.qml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qml/GlobalVar.qml b/src/qml/GlobalVar.qml index f82a437f..754dfed3 100644 --- a/src/qml/GlobalVar.qml +++ b/src/qml/GlobalVar.qml @@ -27,7 +27,8 @@ Item { Connections { target: albumControl onSigRepeatUrls: { - DTK.sendMessage(stackControl, qsTr("The photo/video already exists"), "warning") + if (urls.length > 0) + DTK.sendMessage(stackControl, qsTr("The photo/video already exists"), "warning") } } diff --git a/src/qml/MainAlbumView.qml b/src/qml/MainAlbumView.qml index 3db172c7..aa039fa8 100644 --- a/src/qml/MainAlbumView.qml +++ b/src/qml/MainAlbumView.qml @@ -245,7 +245,8 @@ Item { leftSidebar.enabled = true thumbnailImage.enabled = true titleAlubmRect.enabled = true - DTK.sendMessage(stackControl, qsTr("Import failed"), "warning") + if (urls.length === 0) + DTK.sendMessage(stackControl, qsTr("Import failed"), "warning") } } }