Simplification

pull/198/head
M66B 3 years ago
parent e5cf2130c4
commit 459faa0ff2

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

Loading…
Cancel
Save