mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Simplification
This commit is contained in:
@@ -2003,7 +2003,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
else
|
||||
icon = EntityFolder.getIcon(dX > 0 ? swipes.right_type : swipes.left_type);
|
||||
|
||||
Drawable d = getResources().getDrawable(icon, context.getTheme()).mutate();
|
||||
Drawable d = context.getDrawable(icon).mutate();
|
||||
d.setTint(Helper.resolveColor(context, android.R.attr.textColorSecondary));
|
||||
|
||||
if (dX > 0) {
|
||||
@@ -4512,7 +4512,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
tvSelectedCount.setText(NF.format(count));
|
||||
if (count > (BuildConfig.DEBUG ? 10 : MAX_MORE)) {
|
||||
int ts = Math.round(tvSelectedCount.getTextSize());
|
||||
Drawable w = context.getResources().getDrawable(R.drawable.twotone_warning_24, context.getTheme());
|
||||
Drawable w = context.getDrawable(R.drawable.twotone_warning_24);
|
||||
w.setBounds(0, 0, ts, ts);
|
||||
w.setTint(tvSelectedCount.getCurrentTextColor());
|
||||
tvSelectedCount.setCompoundDrawablesRelative(null, null, w, null);
|
||||
@@ -7999,7 +7999,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
|
||||
Drawable source = null;
|
||||
if (sources.size() == 1) {
|
||||
source = getResources().getDrawable(EntityFolder.getIcon(sources.get(0)), null);
|
||||
source = getContext().getDrawable(EntityFolder.getIcon(sources.get(0)));
|
||||
if (source != null)
|
||||
source.setBounds(0, 0, source.getIntrinsicWidth(), source.getIntrinsicHeight());
|
||||
if (sourceColor == null)
|
||||
@@ -8009,7 +8009,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
|
||||
Drawable target = null;
|
||||
if (targets.size() == 1) {
|
||||
target = getResources().getDrawable(EntityFolder.getIcon(targets.get(0)), null);
|
||||
target = getContext().getDrawable(EntityFolder.getIcon(targets.get(0)));
|
||||
if (target != null)
|
||||
target.setBounds(0, 0, target.getIntrinsicWidth(), target.getIntrinsicHeight());
|
||||
if (targetColor == null)
|
||||
|
||||
Reference in New Issue
Block a user