Skip to content

Commit bd0e1ed

Browse files
committed
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
1 parent 87b7184 commit bd0e1ed

2 files changed

Lines changed: 1 addition & 28 deletions

File tree

panels/notification/bubble/bubblepanel.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,7 @@ void BubblePanel::onNotificationStateChanged(qint64 id, int processedType)
111111
void BubblePanel::onBubbleCountChanged()
112112
{
113113
bool isEmpty = m_bubbles->items().isEmpty();
114-
if (isEmpty) {
115-
QTimer::singleShot(400, this, [this]() {
116-
setVisible(false);
117-
});
118-
} else {
119-
setVisible(!isEmpty && enabled());
120-
}
114+
setVisible(!isEmpty && enabled());
121115
}
122116

123117
void BubblePanel::addBubble(qint64 id)

panels/notification/bubble/package/main.qml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -129,29 +129,8 @@ Window {
129129
}
130130
}
131131
delegate: Bubble {
132-
id: delegateItem
133132
width: 360
134133
bubble: model
135-
136-
ListView.onRemove: SequentialAnimation {
137-
PropertyAction {
138-
target: delegateItem
139-
property: "ListView.delayRemove"
140-
value: true
141-
}
142-
NumberAnimation {
143-
target: delegateItem
144-
property: "x"
145-
to: 360
146-
duration: 400
147-
easing.type: Easing.InExpo
148-
}
149-
PropertyAction {
150-
target: delegateItem
151-
property: "ListView.delayRemove"
152-
value: false
153-
}
154-
}
155134
}
156135
}
157136
}

0 commit comments

Comments
 (0)