mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Red for permanent deletion
This commit is contained in:
parent
8eb987ef38
commit
b36ff741ad
2 changed files with 8 additions and 2 deletions
|
@ -350,6 +350,12 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
|||
return null;
|
||||
}
|
||||
|
||||
static Integer getDefaultColor(Long action, String type) {
|
||||
if (EntityMessage.SWIPE_ACTION_DELETE.equals(action))
|
||||
return Color.RED;
|
||||
return getDefaultColor(type);
|
||||
}
|
||||
|
||||
String getDisplayName(Context context) {
|
||||
return (display == null ? localizeName(context, name) : display);
|
||||
}
|
||||
|
|
|
@ -2066,7 +2066,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
// Right swipe
|
||||
d.setAlpha(Math.round(255 * Math.min(dX / (2 * margin + size), 1.0f)));
|
||||
if (swipes.right_color == null) {
|
||||
Integer color = EntityFolder.getDefaultColor(swipes.right_type);
|
||||
Integer color = EntityFolder.getDefaultColor(swipes.swipe_right, swipes.right_type);
|
||||
if (color != null)
|
||||
d.setTint(color);
|
||||
} else
|
||||
|
@ -2082,7 +2082,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
// Left swipe
|
||||
d.setAlpha(Math.round(255 * Math.min(-dX / (2 * margin + size), 1.0f)));
|
||||
if (swipes.left_color == null) {
|
||||
Integer color = EntityFolder.getDefaultColor(swipes.left_type);
|
||||
Integer color = EntityFolder.getDefaultColor(swipes.swipe_left, swipes.left_type);
|
||||
if (color != null)
|
||||
d.setTint(color);
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue