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)
statusBar()->clearProgressFeeds();
tabWidget()->feedMessageViewer()->messagesView()->reloadSelections(true);
tabWidget()->feedMessageViewer()->messagesView()->reloadSelections();
}
void FormMain::onFeedUpdatesStarted() {

View File

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

View File

@ -29,7 +29,7 @@ class MessagesView : public QTreeView {
// Called after data got changed externally
// 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.
void loadItem(RootItem* item);