This commit is contained in:
Martin Rotter 2015-12-09 12:58:01 +01:00
parent 09b023b937
commit 97e5e70afa
2 changed files with 3 additions and 4 deletions

View File

@ -426,8 +426,7 @@ bool MessagesModel::setBatchMessagesRead(const QModelIndexList &messages, RootIt
query_read_msg.setForwardOnly(true);
if (query_read_msg.exec(QString(QSL("UPDATE Messages SET is_read = %2 WHERE id IN (%1);"))
.arg(message_ids.join(QSL(", ")),
read == RootItem::Read ? QSL("1") : QSL("0")))) {
.arg(message_ids.join(QSL(", ")), read == RootItem::Read ? QSL("1") : QSL("0")))) {
fetchAllData();
return m_selectedItem->getParentServiceRoot()->onAfterSetMessagesRead(m_selectedItem, message_ids_num, read);

View File

@ -440,11 +440,11 @@ void MessagesView::reselectIndexes(const QModelIndexList &indexes) {
QItemSelection selection;
foreach (const QModelIndex &index, indexes) {
// FIXME: THIS IS very slow. Try to select 4000 messages and hit "mark as read" button.
selection.merge(QItemSelection(index, index), QItemSelectionModel::Select);
}
selectionModel()->select(selection, QItemSelectionModel::Select | QItemSelectionModel::Rows);
// FIXME: THIS IS very slow. Try to select 4000 messages and hit "mark as read" button.
//selectionModel()->select(selection, QItemSelectionModel::Select | QItemSelectionModel::Rows);
}
void MessagesView::selectNextItem() {