From d9bfcddca5b477565346049fb202c5ba9b6d6216 Mon Sep 17 00:00:00 2001 From: Mengci Cai Date: Thu, 12 Mar 2026 11:07:35 +0800 Subject: [PATCH] fix: remove bubble removal animation and simplify visibility logic Removed the complex animation sequence when bubbles are removed from the notification panel and simplified the visibility control logic. The previous implementation had a delayed hide mechanism that caused unnecessary complexity and potential timing issues. The bubble removal animation in QML was overly complex with sequential animations and property actions, which could lead to inconsistent behavior. The C++ visibility logic was simplified by removing the delayed hide timer, making the panel state management more straightforward and reliable. Log: Improved notification bubble panel behavior with smoother transitions Influence: 1. Test adding multiple notification bubbles 2. Verify bubbles are properly removed when dismissed 3. Check that panel visibility updates correctly when last bubble is removed 4. Test panel behavior when notifications come in rapid succession 5. Verify no visual glitches during bubble transitions 6. Test with different notification types and durations PMS: BUG-284659 --- panels/notification/bubble/bubblepanel.cpp | 8 +------- panels/notification/bubble/package/main.qml | 21 --------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/panels/notification/bubble/bubblepanel.cpp b/panels/notification/bubble/bubblepanel.cpp index f643b7833..8c0edc912 100644 --- a/panels/notification/bubble/bubblepanel.cpp +++ b/panels/notification/bubble/bubblepanel.cpp @@ -111,13 +111,7 @@ void BubblePanel::onNotificationStateChanged(qint64 id, int processedType) void BubblePanel::onBubbleCountChanged() { bool isEmpty = m_bubbles->items().isEmpty(); - if (isEmpty) { - QTimer::singleShot(400, this, [this]() { - setVisible(false); - }); - } else { - setVisible(!isEmpty && enabled()); - } + setVisible(!isEmpty && enabled()); } void BubblePanel::addBubble(qint64 id) diff --git a/panels/notification/bubble/package/main.qml b/panels/notification/bubble/package/main.qml index 342a14169..80ccac395 100644 --- a/panels/notification/bubble/package/main.qml +++ b/panels/notification/bubble/package/main.qml @@ -129,29 +129,8 @@ Window { } } delegate: Bubble { - id: delegateItem width: 360 bubble: model - - ListView.onRemove: SequentialAnimation { - PropertyAction { - target: delegateItem - property: "ListView.delayRemove" - value: true - } - NumberAnimation { - target: delegateItem - property: "x" - to: 360 - duration: 400 - easing.type: Easing.InExpo - } - PropertyAction { - target: delegateItem - property: "ListView.delayRemove" - value: false - } - } } } }