Skip to content

Commit 3f48ee4

Browse files
yixinsharkdeepin-bot[bot]
authored andcommitted
fix: Setting notifications number less than 3, do not display overlay
as title Log: as title Bug: https://pms.uniontech.com/bug-view-290185.html
1 parent 7eb440c commit 3f48ee4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

panels/notification/bubble/bubblemodel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,10 @@ void BubbleModel::updateLevel()
292292
if (m_bubbles.isEmpty())
293293
return;
294294

295+
int lastBubbleMaxIndex = BubbleMaxCount - 1;
295296
for (int i = 0; i < displayRowCount(); i++) {
296297
auto item = m_bubbles.at(i);
297-
item->setLevel(i == LastBubbleMaxIndex ? 1 + overlayCount() : 1);
298+
item->setLevel(i == lastBubbleMaxIndex ? 1 + overlayCount() : 1);
298299
}
299300
Q_EMIT dataChanged(index(0), index(displayRowCount() - 1), {BubbleModel::Level});
300301
}

panels/notification/bubble/bubblemodel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class BubbleModel : public QAbstractListModel
7575
QTimer *m_updateTimeTipTimer = nullptr;
7676
QList<BubbleItem *> m_bubbles;
7777
int BubbleMaxCount{3};
78-
const int LastBubbleMaxIndex{BubbleMaxCount - 1};
7978
const int OverlayMaxCount{2};
8079
const int NoReplaceId{0};
8180
QList<qint64> m_delayBubbles;

0 commit comments

Comments
 (0)