mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-10 02:53:46 +02:00
Simplification
This commit is contained in:
@@ -220,7 +220,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||
|
||||
Integer percent = null;
|
||||
if (!settings && account.quota_usage != null && account.quota_limit != null)
|
||||
percent = Math.round((float) account.quota_usage * 100 / account.quota_limit);
|
||||
percent = Math.round(account.quota_usage * 100f / account.quota_limit);
|
||||
|
||||
tvUsage.setText(percent == null ? null : NF.format(percent) + "%");
|
||||
tvUsage.setVisibility(percent == null ? View.GONE : View.VISIBLE);
|
||||
|
||||
@@ -311,7 +311,7 @@ public class FragmentFolders extends FragmentBase {
|
||||
imap = (account != null && account.protocol == EntityAccount.TYPE_IMAP);
|
||||
|
||||
if (account != null && account.quota_usage != null && account.quota_limit != null) {
|
||||
int percent = Math.round((float) account.quota_usage * 100 / account.quota_limit);
|
||||
int percent = Math.round(account.quota_usage * 100f / account.quota_limit);
|
||||
setSubtitle(getString(R.string.title_name_count,
|
||||
account.name, NF.format(percent) + "%"));
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user