Add new notifications at the top of the list
Summary: This will show a list with the most recent notifications at the top, in the plasmoid. This is more consistent with the KDE notification plasmoid that stack them like this too. Reviewers: apol, #kde_connect Reviewed By: apol, #kde_connect Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D13540
This commit is contained in:
parent
48108cd316
commit
628afdeb1e
1 changed files with 2 additions and 3 deletions
|
@ -102,10 +102,9 @@ void NotificationsModel::setDeviceId(const QString& deviceId)
|
||||||
|
|
||||||
void NotificationsModel::notificationAdded(const QString& id)
|
void NotificationsModel::notificationAdded(const QString& id)
|
||||||
{
|
{
|
||||||
int currentSize = m_notificationList.size();
|
beginInsertRows(QModelIndex(), 0, 0);
|
||||||
beginInsertRows(QModelIndex(), currentSize, currentSize);
|
|
||||||
NotificationDbusInterface* dbusInterface = new NotificationDbusInterface(m_deviceId, id, this);
|
NotificationDbusInterface* dbusInterface = new NotificationDbusInterface(m_deviceId, id, this);
|
||||||
m_notificationList.append(dbusInterface);
|
m_notificationList.prepend(dbusInterface);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue