mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Added many messages selected warning
This commit is contained in:
parent
8340ac370c
commit
1aca09e74a
1 changed files with 13 additions and 1 deletions
|
@ -4452,7 +4452,19 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
private void updateMore() {
|
||||
if (selectionTracker != null && selectionTracker.hasSelection()) {
|
||||
fabMore.show();
|
||||
tvSelectedCount.setText(NF.format(selectionTracker.getSelection().size()));
|
||||
|
||||
Context context = tvSelectedCount.getContext();
|
||||
int count = selectionTracker.getSelection().size();
|
||||
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());
|
||||
w.setBounds(0, 0, ts, ts);
|
||||
w.setTint(tvSelectedCount.getCurrentTextColor());
|
||||
tvSelectedCount.setCompoundDrawablesRelative(null, null, w, null);
|
||||
tvSelectedCount.setCompoundDrawablePadding(ts / 2);
|
||||
} else
|
||||
tvSelectedCount.setCompoundDrawablesRelative(null, null, null, null);
|
||||
tvSelectedCount.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
fabMore.hide();
|
||||
|
|
Loading…
Reference in a new issue