From 5ed5670ab9fbc96e2c42932d176923fa28dae7bd Mon Sep 17 00:00:00 2001 From: reionwong Date: Sat, 9 Oct 2021 11:16:12 +0800 Subject: [PATCH] Fix notifications order --- notificationd/historymodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notificationd/historymodel.cpp b/notificationd/historymodel.cpp index 78a694c..d9b6bc3 100644 --- a/notificationd/historymodel.cpp +++ b/notificationd/historymodel.cpp @@ -83,8 +83,8 @@ QHash HistoryModel::roleNames() const void HistoryModel::add(const Notification ¬ification) { - beginInsertRows(QModelIndex(), m_notifications.size(), m_notifications.size()); - m_notifications.append(std::move(notification)); + beginInsertRows(QModelIndex(), 0, 0); + m_notifications.prepend(std::move(notification)); endInsertRows(); save(); }