There was refactored code

This commit is contained in:
Alex 2023-04-06 16:20:39 +03:00
parent 95eb3eca16
commit 43ea5822c7

View File

@ -39,10 +39,9 @@ QHash<int, QByteArray> HistoryNotificationsModel::roleNames() const {
void HistoryNotificationsModel::setHistory(const QmlNotificationService::NotificationData &notificationData) {
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() {