Merge branch 'master' of github.com:M66B/FairEmail

master
M66B 2 months ago
commit 15d35ba506

@ -5210,11 +5210,13 @@ class Core {
if (!Helper.equal(message.keywords, keywords) &&
!folder.read_only &&
(ifolder.getPermanentFlags().contains(Flags.Flag.USER) || keywords.length > 0)) {
(ifolder.getPermanentFlags().contains(Flags.Flag.USER) || MessageHelper.hasUserKeywords(keywords))) {
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid +
" flags=" + ifolder.getPermanentFlags().contains(Flags.Flag.USER) +
" keywords=" + (message.keywords == null ? null : TextUtils.join(" ", message.keywords)) +
"/" + TextUtils.join(" ", keywords));
update = true;
message.keywords = keywords;
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid +
" keywords=" + TextUtils.join(" ", keywords));
message.importance = null;
for (String keyword : keywords)

@ -302,6 +302,13 @@ public class MessageHelper {
"$social" // mailbox.org
));
private static final List<String> FLAG_USER = Collections.unmodifiableList(Arrays.asList(
FLAG_CLASSIFIED,
FLAG_FILTERED,
FLAG_LOW_IMPORTANCE,
FLAG_HIGH_IMPORTANCE
));
// https://tools.ietf.org/html/rfc4021
static void setSystemProperties(Context context) {
@ -1591,6 +1598,22 @@ public class MessageHelper {
return true;
}
static boolean hasUserKeywords(String[] keywords) {
if (keywords == null)
return false;
for (String keyword : keywords) {
if (TextUtils.isEmpty(keyword))
continue;
if (FLAG_USER.contains(keyword))
return true;
if (FLAG_BLACKLIST.contains(keyword))
continue;
if (!keyword.startsWith("$"))
return true;
}
return false;
}
String getMessageID() throws MessagingException {
ensureEnvelope();

@ -1,6 +1,6 @@
plugins {
// https://developer.android.com/studio/releases/gradle-plugin
id 'com.android.application' version '9.2.0' apply false
id 'com.android.application' version '9.2.1' apply false
//id 'com.android.library' version '9.2.0' apply false
// https://plugins.gradle.org/plugin/de.undercouch.download
id 'de.undercouch.download' version '5.6.0' apply false

Loading…
Cancel
Save