Revert, should work

This commit is contained in:
Martin Rotter 2021-05-17 14:17:01 +02:00
parent 95e9279192
commit 2aa9f7c255
3 changed files with 3 additions and 7 deletions

View file

@ -396,7 +396,7 @@ void FormMain::onFeedUpdatesFinished(const FeedDownloadResults& results) {
Q_UNUSED(results) Q_UNUSED(results)
statusBar()->clearProgressFeeds(); statusBar()->clearProgressFeeds();
tabWidget()->feedMessageViewer()->messagesView()->reloadSelections(true); tabWidget()->feedMessageViewer()->messagesView()->reloadSelections();
} }
void FormMain::onFeedUpdatesStarted() { void FormMain::onFeedUpdatesStarted() {

View file

@ -84,7 +84,7 @@ void MessagesView::keyboardSearch(const QString& search) {
setSelectionMode(QAbstractItemView::SelectionMode::ExtendedSelection); setSelectionMode(QAbstractItemView::SelectionMode::ExtendedSelection);
} }
void MessagesView::reloadSelections(bool only_if_nothing_selected) { void MessagesView::reloadSelections() {
const QDateTime dt1 = QDateTime::currentDateTime(); const QDateTime dt1 = QDateTime::currentDateTime();
QModelIndex current_index = selectionModel()->currentIndex(); QModelIndex current_index = selectionModel()->currentIndex();
const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index); const QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index);
@ -92,10 +92,6 @@ void MessagesView::reloadSelections(bool only_if_nothing_selected) {
const int col = header()->sortIndicatorSection(); const int col = header()->sortIndicatorSection();
const Qt::SortOrder ord = header()->sortIndicatorOrder(); const Qt::SortOrder ord = header()->sortIndicatorOrder();
if (only_if_nothing_selected && selected_message.m_id > 0) {
return;
}
// Reload the model now. // Reload the model now.
sort(col, ord, true, false, false); sort(col, ord, true, false, false);

View file

@ -29,7 +29,7 @@ class MessagesView : public QTreeView {
// Called after data got changed externally // Called after data got changed externally
// and it needs to be reloaded to the view. // and it needs to be reloaded to the view.
void reloadSelections(bool only_if_nothing_selected = false); void reloadSelections();
// Loads un-deleted messages from selected feeds. // Loads un-deleted messages from selected feeds.
void loadItem(RootItem* item); void loadItem(RootItem* item);