1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-30 19:56:10 +00:00

Removed log color caching

This commit is contained in:
M66B 2022-01-29 15:36:26 +01:00
parent 2541a2ef69
commit df9b834228

View file

@ -26,13 +26,10 @@ import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.preference.PreferenceManager;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
@ -67,9 +64,6 @@ public class EntityLog {
@NonNull
public String data;
@Ignore
private static Map<Type, Integer> mapColor = new HashMap<>();
enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules}
private static final ExecutorService executor =
@ -206,12 +200,6 @@ public class EntityLog {
}
static Integer getColor(Context context, Type type) {
if (!mapColor.containsKey(type))
mapColor.put(type, _getColor(context, type));
return mapColor.get(type);
}
private static Integer _getColor(Context context, Type type) {
// R.color.solarizedRed
switch (type) {
case General: