Add Purge flag to MsgObject.
This commit is contained in:
parent
ac8fdf6fae
commit
b077c7f846
@ -190,3 +190,7 @@ QList<Label*> MessageObject::assignedLabels() const {
|
||||
QList<Label*> MessageObject::availableLabels() const {
|
||||
return m_availableLabels;
|
||||
}
|
||||
|
||||
bool MessageObject::alreadyStored() const {
|
||||
return m_message->m_id > 0;
|
||||
}
|
||||
|
@ -21,14 +21,18 @@ class MessageObject : public QObject {
|
||||
Q_PROPERTY(QDateTime created READ created WRITE setCreated)
|
||||
Q_PROPERTY(bool isRead READ isRead WRITE setIsRead)
|
||||
Q_PROPERTY(bool isImportant READ isImportant WRITE setIsImportant)
|
||||
Q_PROPERTY(bool alreadyStored READ alreadyStored)
|
||||
|
||||
public:
|
||||
enum class FilteringAction {
|
||||
// Message is normally accepted and stored in DB.
|
||||
// Message is normally accepted and stored in DB or updated.
|
||||
Accept = 1,
|
||||
|
||||
// Message is ignored and now stored in DB.
|
||||
Ignore = 2
|
||||
// Message is ignored and will not be stored in DB but is not purge if it already exists.
|
||||
Ignore = 2,
|
||||
|
||||
// Message is purged from DB if it already exists.
|
||||
Purge = 4
|
||||
};
|
||||
|
||||
Q_ENUM(FilteringAction)
|
||||
@ -77,6 +81,8 @@ class MessageObject : public QObject {
|
||||
QList<Label*> assignedLabels() const;
|
||||
QList<Label*> availableLabels() const;
|
||||
|
||||
bool alreadyStored() const;
|
||||
|
||||
// Generic Message's properties bindings.
|
||||
QString feedCustomId() const;
|
||||
int accountId() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user