1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-04 06:20:26 +00:00
This commit is contained in:
M66B 2021-05-18 08:22:23 +02:00
parent e41edf31e7
commit d1eabddeda

View file

@ -121,7 +121,11 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
ivExternal.setVisibility(View.GONE);
int percent = Math.round(account.quota_usage * 100f / account.quota_limit);
int percent;
if (account.quota_usage == null || account.quota_limit == null)
percent = 0;
else
percent = Math.round(account.quota_usage * 100f / account.quota_limit);
if (account.error != null) {
ivWarning.setEnabled(false);
ivWarning.setImageResource(R.drawable.twotone_warning_24);