mirror of https://github.com/M66B/FairEmail.git
Optimization
This commit is contained in:
parent
ac04a5e220
commit
93c3169f5a
|
@ -5862,8 +5862,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
if (selectionTracker != null && selectionTracker.hasSelection()) {
|
if (selectionTracker != null && selectionTracker.hasSelection()) {
|
||||||
fabMore.show();
|
fabMore.show();
|
||||||
|
|
||||||
|
long[] selection = getSelection();
|
||||||
|
|
||||||
Context context = tvSelectedCount.getContext();
|
Context context = tvSelectedCount.getContext();
|
||||||
int count = getSelection().length;
|
int count = selection.length;
|
||||||
tvSelectedCount.setText(NF.format(count));
|
tvSelectedCount.setText(NF.format(count));
|
||||||
if (count > (BuildConfig.DEBUG ? 10 : MAX_MORE)) {
|
if (count > (BuildConfig.DEBUG ? 10 : MAX_MORE)) {
|
||||||
int ts = Math.round(tvSelectedCount.getTextSize());
|
int ts = Math.round(tvSelectedCount.getTextSize());
|
||||||
|
@ -5877,7 +5879,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
tvSelectedCount.setVisibility(View.VISIBLE);
|
tvSelectedCount.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putLongArray("ids", getSelection());
|
args.putLongArray("ids", selection);
|
||||||
|
|
||||||
new SimpleTask<Boolean[]>() {
|
new SimpleTask<Boolean[]>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -5960,7 +5962,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
protected void onException(Bundle args, Throwable ex) {
|
protected void onException(Bundle args, Throwable ex) {
|
||||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||||
}
|
}
|
||||||
}.setExecutor(executor).execute(this, args, "fabs");
|
}.setExecutor(executor).execute(this, args, "quickactions");
|
||||||
} else {
|
} else {
|
||||||
fabMore.hide();
|
fabMore.hide();
|
||||||
tvSelectedCount.setVisibility(View.GONE);
|
tvSelectedCount.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in New Issue