diff --git a/panels/notification/bubble/bubblemodel.cpp b/panels/notification/bubble/bubblemodel.cpp index 84cf93361..8960a64c0 100644 --- a/panels/notification/bubble/bubblemodel.cpp +++ b/panels/notification/bubble/bubblemodel.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -83,7 +83,7 @@ void BubbleModel::clear() m_bubbles.clear(); endResetModel(); m_delayBubbles.clear(); - m_delayRemovedBubble = -1; + m_delayRemovedBubble = 0; updateLevel(); m_updateTimeTipTimer->stop(); diff --git a/panels/notification/bubble/bubblemodel.h b/panels/notification/bubble/bubblemodel.h index 1398f4925..00f31b1d3 100644 --- a/panels/notification/bubble/bubblemodel.h +++ b/panels/notification/bubble/bubblemodel.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -82,7 +82,7 @@ class BubbleModel : public QAbstractListModel int m_contentRowCount{6}; const int OverlayMaxCount{2}; QList m_delayBubbles; - qint64 m_delayRemovedBubble{-1}; + qint64 m_delayRemovedBubble{0}; const int DelayRemovBubbleTime{1000}; }; diff --git a/panels/notification/bubble/package/Bubble.qml b/panels/notification/bubble/package/Bubble.qml index 6db090156..10f3e3875 100644 --- a/panels/notification/bubble/package/Bubble.qml +++ b/panels/notification/bubble/package/Bubble.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: LGPL-3.0-or-later @@ -16,7 +16,7 @@ Control { if (control.hovered) { Applet.bubbles.delayRemovedBubble = bubble.id } else { - Applet.bubbles.delayRemovedBubble = -1 + Applet.bubbles.delayRemovedBubble = 0 } } diff --git a/panels/notification/common/memoryaccessor.cpp b/panels/notification/common/memoryaccessor.cpp index 8672b192f..0eb4c08d7 100644 --- a/panels/notification/common/memoryaccessor.cpp +++ b/panels/notification/common/memoryaccessor.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -34,6 +34,7 @@ qint64 MemoryAccessor::replaceEntity(qint64 id, const NotifyEntity &entity) const auto index = (iter - m_entities.begin()); Q_ASSERT(index >= 0); m_entities[index] = entity; + m_entities[index].setId(id); } else { return -1; }