mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Improved quota handling
This commit is contained in:
@@ -205,6 +205,14 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||
return id;
|
||||
}
|
||||
|
||||
Integer getQuotaPercentage() {
|
||||
if (quota_usage == null || quota_limit == null)
|
||||
return null;
|
||||
|
||||
int percent = Math.round(quota_usage * 100f / quota_limit);
|
||||
return (percent > 100 ? null : percent);
|
||||
}
|
||||
|
||||
@Override
|
||||
String[] getSortTitle(Context context) {
|
||||
return new String[]{name, null};
|
||||
|
||||
Reference in New Issue
Block a user