Skip to content

Commit

Permalink
Add new notifications at the top of the list
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas Surrel authored and nicolasfella committed Jul 12, 2018
1 parent 48108cd commit 628afde
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions interfaces/notificationsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ void NotificationsModel::setDeviceId(const QString& deviceId)

void NotificationsModel::notificationAdded(const QString& id)
{
int currentSize = m_notificationList.size();
beginInsertRows(QModelIndex(), currentSize, currentSize);
beginInsertRows(QModelIndex(), 0, 0);
NotificationDbusInterface* dbusInterface = new NotificationDbusInterface(m_deviceId, id, this);
m_notificationList.append(dbusInterface);
m_notificationList.prepend(dbusInterface);
endInsertRows();
}

Expand Down

0 comments on commit 628afde

Please sign in to comment.