mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-26 05:34:34 +00:00
There was refactored code
This commit is contained in:
parent
95eb3eca16
commit
43ea5822c7
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user