Hmmm.
This commit is contained in:
parent
09b023b937
commit
97e5e70afa
src
@ -426,8 +426,7 @@ bool MessagesModel::setBatchMessagesRead(const QModelIndexList &messages, RootIt
|
|||||||
query_read_msg.setForwardOnly(true);
|
query_read_msg.setForwardOnly(true);
|
||||||
|
|
||||||
if (query_read_msg.exec(QString(QSL("UPDATE Messages SET is_read = %2 WHERE id IN (%1);"))
|
if (query_read_msg.exec(QString(QSL("UPDATE Messages SET is_read = %2 WHERE id IN (%1);"))
|
||||||
.arg(message_ids.join(QSL(", ")),
|
.arg(message_ids.join(QSL(", ")), read == RootItem::Read ? QSL("1") : QSL("0")))) {
|
||||||
read == RootItem::Read ? QSL("1") : QSL("0")))) {
|
|
||||||
fetchAllData();
|
fetchAllData();
|
||||||
|
|
||||||
return m_selectedItem->getParentServiceRoot()->onAfterSetMessagesRead(m_selectedItem, message_ids_num, read);
|
return m_selectedItem->getParentServiceRoot()->onAfterSetMessagesRead(m_selectedItem, message_ids_num, read);
|
||||||
|
@ -440,11 +440,11 @@ void MessagesView::reselectIndexes(const QModelIndexList &indexes) {
|
|||||||
QItemSelection selection;
|
QItemSelection selection;
|
||||||
|
|
||||||
foreach (const QModelIndex &index, indexes) {
|
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);
|
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() {
|
void MessagesView::selectNextItem() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user