mirror of
https://github.com/djcb/mu.git
synced 2024-06-21 06:56:48 +02:00
flags: add flags_mail_dir_file util
And some whitespace cleanup
This commit is contained in:
parent
472f69beb2
commit
ae87be6a48
|
@ -348,7 +348,7 @@ flags_from_expr(std::string_view expr,
|
||||||
* @param flags flags
|
* @param flags flags
|
||||||
* @param cat category
|
* @param cat category
|
||||||
*
|
*
|
||||||
* @return filter flags
|
* @return filtered flags
|
||||||
*/
|
*/
|
||||||
constexpr Flags
|
constexpr Flags
|
||||||
flags_filter(Flags flags, MessageFlagCategory cat)
|
flags_filter(Flags flags, MessageFlagCategory cat)
|
||||||
|
@ -359,6 +359,25 @@ flags_filter(Flags flags, MessageFlagCategory cat)
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter out any flags which are _not_ Maildir / Mailfile flags
|
||||||
|
*
|
||||||
|
* @param flags flags
|
||||||
|
*
|
||||||
|
* @return filtered flags
|
||||||
|
*/
|
||||||
|
constexpr Flags
|
||||||
|
flags_mail_dir_file(Flags flags)
|
||||||
|
{
|
||||||
|
for (auto&& info : AllMessageFlagInfos)
|
||||||
|
if (info.category != MessageFlagCategory::Maildir &&
|
||||||
|
info.category != MessageFlagCategory::Mailfile)
|
||||||
|
flags &= ~info.flag;
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return flags, where flags = new_flags but with unmutable_flag in the
|
* Return flags, where flags = new_flags but with unmutable_flag in the
|
||||||
|
|
Loading…
Reference in New Issue
Block a user