fix article deduplication
This commit is contained in:
parent
c41ca13ad1
commit
d5444981c4
@ -68,6 +68,13 @@ bool MessageObject::isDuplicateWithAttribute(MessageObject::DuplicateCheck attri
|
||||
where_clauses.append(QSL("account_id = :account_id"));
|
||||
bind_values.append({QSL(":account_id"), accountId()});
|
||||
|
||||
// If we have already message stored in DB, then we also must
|
||||
// make sure that we do not match the message against itself.
|
||||
if (!runningFilterWhenFetching() && m_message->m_id > 0) {
|
||||
where_clauses.append(QSL("id != :id"));
|
||||
bind_values.append({QSL(":id"), QString::number(m_message->m_id)});
|
||||
}
|
||||
|
||||
if ((attribute_check & DuplicateCheck::AllFeedsSameAccount) != DuplicateCheck::AllFeedsSameAccount) {
|
||||
// Limit to current feed.
|
||||
where_clauses.append(QSL("feed = :feed"));
|
||||
|
@ -32,6 +32,7 @@ FormMessageFiltersManager::FormMessageFiltersManager(FeedReader* reader,
|
||||
return lhs->title().compare(rhs->title(), Qt::CaseSensitivity::CaseInsensitive) < 0;
|
||||
});
|
||||
|
||||
// TODO: Add sorting.
|
||||
m_ui.m_treeExistingMessages->setModel(m_msgModel);
|
||||
|
||||
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("view-list-details")));
|
||||
@ -373,8 +374,8 @@ void FormMessageFiltersManager::processCheckedFeeds() {
|
||||
|
||||
// Create backup of message.
|
||||
Message* msg = &msgs[i];
|
||||
msg->m_assignedLabels = labels_in_message;
|
||||
|
||||
msg->m_assignedLabels = labels_in_message;
|
||||
msg->m_rawContents = Message::generateRawAtomContents(*msg);
|
||||
|
||||
Message msg_backup(*msg);
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <QMetaObject>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QStyleFactory>
|
||||
#include <QStyleHints>
|
||||
#include <QTextDocument>
|
||||
#include <QToolTip>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user