diff --git a/historynotificationsmodel.cpp b/historynotificationsmodel.cpp index 8e45794..04388cf 100644 --- a/historynotificationsmodel.cpp +++ b/historynotificationsmodel.cpp @@ -39,10 +39,9 @@ QHash<int, QByteArray> HistoryNotificationsModel::roleNames() const { void HistoryNotificationsModel::setHistory(const QmlNotificationService::NotificationData ¬ificationData) { - const int index = notificationsList.count() > 0? notificationsList.count() - 1 : notificationsList.count(); - beginInsertRows(QModelIndex(), index, index); - notificationsList.insert(index, notificationData); - endInsertRows(); + beginResetModel(); + notificationsList.push_back(notificationData); + endResetModel(); } void HistoryNotificationsModel::clearAllHistory() {