Default swipe icon colors

This commit is contained in:
M66B
2020-12-23 09:10:07 +01:00
parent ffd4487870
commit 68c55c4300
2 changed files with 17 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ package eu.faircode.email;
*/
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import androidx.annotation.NonNull;
@@ -325,6 +326,12 @@ public class EntityFolder extends EntityOrder implements Serializable {
return R.drawable.twotone_folder_24;
}
static Integer getDefaultColor(String type) {
if (EntityFolder.TRASH.equals(type) || EntityFolder.JUNK.equals(type))
return Color.RED;
return null;
}
String getDisplayName(Context context) {
return (display == null ? localizeName(context, name) : display);
}