Fixed reselecting of HUGE number of messages.

This commit is contained in:
Martin Rotter 2015-12-10 08:24:38 +01:00
parent e66fb101e9
commit 0b5b75d3bd
6 changed files with 10 additions and 19 deletions

View File

@ -24,6 +24,7 @@
Fixed:
<ul>
<li>Solved problem when user selects HUGE number of individual messages and marks them read/unread. Reselecting them after change may cause RSS Guard to hang.</li>
<li>Better info in popup notification when many feeds are updated.</li>
<li>Fixed obtaining of contents in RSS 2.0 feed entries. (bug #130)</li>
<li>Improved popup informing about changes in newly installed version.</li>

View File

@ -53,6 +53,7 @@
#define URL_REGEXP "^(http|https|feed|ftp):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&amp;:/~\\+#]*[\\w\\-\\@?^=%&amp;/~\\+#])?$"
#define USER_AGENT_HTTP_HEADER "User-Agent"
#define TEXT_TITLE_LIMIT 30
#define RESELECT_MESSAGE_THRESSHOLD 500
#define MAX_ZOOM_FACTOR 10.0
#define ICON_SIZE_SETTINGS 16
#define NO_PARENT_CATEGORY -1

View File

@ -437,14 +437,15 @@ void MessagesView::switchSelectedMessagesImportance() {
}
void MessagesView::reselectIndexes(const QModelIndexList &indexes) {
QItemSelection selection;
if (indexes.size() < RESELECT_MESSAGE_THRESSHOLD) {
QItemSelection selection;
foreach (const QModelIndex &index, indexes) {
selection.merge(QItemSelection(index, index), QItemSelectionModel::Select);
foreach (const QModelIndex &index, indexes) {
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() {

View File

@ -121,7 +121,7 @@ TtRssGetFeedsCategoriesResponse TtRssNetworkFactory::getFeedsCategories(QNetwork
QtJson::JsonObject json;
json["op"] = "getFeedTree";
json["sid"] = m_sessionId;
json["include_empty"] = true;
json["include_empty"] = false;
QByteArray result_raw;
NetworkResult network_reply = NetworkFactory::uploadData(m_url, DOWNLOAD_TIMEOUT, QtJson::serialize(json), CONTENT_TYPE, result_raw);

9
src/services/tt-rss/ttrssrecyclebin.cpp Normal file → Executable file
View File

@ -24,12 +24,3 @@ TtRssRecycleBin::TtRssRecycleBin(RootItem *parent) : RecycleBin(parent) {
TtRssRecycleBin::~TtRssRecycleBin() {
}
bool TtRssRecycleBin::empty() {
return false;
}
bool TtRssRecycleBin::restore() {
return false;
}

3
src/services/tt-rss/ttrssrecyclebin.h Normal file → Executable file
View File

@ -27,9 +27,6 @@ class TtRssRecycleBin : public RecycleBin {
public:
explicit TtRssRecycleBin(RootItem *parent = 0);
virtual ~TtRssRecycleBin();
bool empty();
bool restore();
};
#endif // TTRSSRECYCLEBIN_H