Optimization

This commit is contained in:
M66B 2022-05-12 07:56:19 +02:00
parent ac04a5e220
commit 93c3169f5a
1 changed files with 5 additions and 3 deletions

View File

@ -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);