mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Use number format
This commit is contained in:
@@ -60,6 +60,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import java.text.Collator;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@@ -167,6 +168,8 @@ public class FragmentMessages extends FragmentBase {
|
||||
private final int action_junk = 9;
|
||||
private final int action_move = 10;
|
||||
|
||||
private static NumberFormat nf = NumberFormat.getNumberInstance();
|
||||
|
||||
private static final int LOCAL_PAGE_SIZE = 100;
|
||||
private static final int REMOTE_PAGE_SIZE = 10;
|
||||
private static final int UNDO_TIMEOUT = 5000; // milliseconds
|
||||
@@ -1544,11 +1547,11 @@ public class FragmentMessages extends FragmentBase {
|
||||
errors = true;
|
||||
}
|
||||
|
||||
String name = getString(R.string.title_folder_unified);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getString(R.string.title_folder_unified));
|
||||
if (unseen > 0)
|
||||
setSubtitle(getString(R.string.title_unseen_count, name, unseen));
|
||||
else
|
||||
setSubtitle(name);
|
||||
sb.append(" (").append(nf.format(unseen)).append(")");
|
||||
setSubtitle(sb.toString());
|
||||
|
||||
boolean refreshing = false;
|
||||
for (TupleFolderEx folder : folders)
|
||||
@@ -1580,11 +1583,11 @@ public class FragmentMessages extends FragmentBase {
|
||||
if (folder == null)
|
||||
setSubtitle(null);
|
||||
else {
|
||||
String name = folder.getDisplayName(getContext());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(folder.getDisplayName(getContext()));
|
||||
if (folder.unseen > 0)
|
||||
setSubtitle(getString(R.string.title_unseen_count, name, folder.unseen));
|
||||
else
|
||||
setSubtitle(name);
|
||||
sb.append(" (").append(nf.format(folder.unseen)).append(")");
|
||||
setSubtitle(sb.toString());
|
||||
|
||||
boolean outbox = EntityFolder.OUTBOX.equals(folder.type);
|
||||
if (FragmentMessages.this.outbox != outbox) {
|
||||
|
||||
Reference in New Issue
Block a user