* features: mark messages as read/unread
This commit is contained in:
@ -475,12 +475,9 @@ get_flags (const char *path, const char *flagstr)
|
||||
MuFlags oldflags;
|
||||
oldflags = mu_maildir_get_flags_from_path (path);
|
||||
return mu_flags_from_str_delta (flagstr, oldflags,
|
||||
MU_FLAG_TYPE_MAILDIR|
|
||||
MU_FLAG_TYPE_MAILFILE);
|
||||
MU_FLAG_TYPE_ANY);
|
||||
} else
|
||||
return mu_flags_from_str (flagstr,
|
||||
MU_FLAG_TYPE_MAILDIR |
|
||||
MU_FLAG_TYPE_MAILFILE);
|
||||
return mu_flags_from_str (flagstr, MU_FLAG_TYPE_ANY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -806,8 +806,11 @@ mu_msg_move_to_maildir (MuMsg *self, const char *maildir,
|
||||
flags |= mu_msg_get_flags (self) &
|
||||
(MU_FLAG_HAS_ATTACH|MU_FLAG_ENCRYPTED|MU_FLAG_SIGNED);
|
||||
/* update the pseudo-flag as well */
|
||||
if (!(flags & MU_FLAG_NEW) || (flags & MU_FLAG_SEEN))
|
||||
if (!(flags & MU_FLAG_NEW) && (flags & MU_FLAG_SEEN))
|
||||
flags &= ~MU_FLAG_UNREAD;
|
||||
else
|
||||
flags |= MU_FLAG_UNREAD;
|
||||
|
||||
mu_msg_cache_set_num (self->_cache, MU_MSG_FIELD_ID_FLAGS, flags);
|
||||
}
|
||||
|
||||
|
||||
@ -717,7 +717,6 @@ mu_store_update_msg (MuStore *store, unsigned docid, MuMsg *msg, GError **err)
|
||||
if (!store->in_transaction())
|
||||
store->begin_transaction();
|
||||
|
||||
|
||||
const std::string term
|
||||
(store->get_uid_term(mu_msg_get_path(msg)));
|
||||
doc.add_term (term);
|
||||
|
||||
Reference in New Issue
Block a user