mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Added Gmail label colors
This commit is contained in:
@@ -68,6 +68,9 @@ public class TupleMessageEx extends EntityMessage {
|
||||
@Ignore
|
||||
boolean duplicate;
|
||||
|
||||
@Ignore
|
||||
public Integer[] label_colors;
|
||||
|
||||
@Ignore
|
||||
public Integer[] keyword_colors;
|
||||
@Ignore
|
||||
@@ -79,6 +82,22 @@ public class TupleMessageEx extends EntityMessage {
|
||||
: folderDisplay);
|
||||
}
|
||||
|
||||
void resolveLabelColors(Context context) {
|
||||
List<Integer> color = new ArrayList<>();
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (this.labels != null)
|
||||
for (int i = 0; i < this.labels.length; i++) {
|
||||
String key = "label.color." + this.labels[i];
|
||||
if (prefs.contains(key))
|
||||
color.add(prefs.getInt(key, Color.GRAY));
|
||||
else
|
||||
color.add(null);
|
||||
}
|
||||
|
||||
this.label_colors = color.toArray(new Integer[0]);
|
||||
}
|
||||
|
||||
void resolveKeywordColors(Context context) {
|
||||
List<Integer> color = new ArrayList<>();
|
||||
List<String> titles = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user