This commit is contained in:
Thomas 2020-12-06 17:15:04 +01:00
parent 0a12020fd8
commit fcc10f97b5
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
long instanceVideoQuota = userMe.getVideoQuota(); long instanceVideoQuota = userMe.getVideoQuota();
long instanceDailyQuota = userMe.getVideoQuotaDaily(); long instanceDailyQuota = userMe.getVideoQuotaDaily();
if (instanceVideoQuota != -1) { if (instanceVideoQuota != -1 && instanceVideoQuota != 0) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
binding.totalQuota.setProgress((int) (videoQuota * 100 / instanceVideoQuota), true); binding.totalQuota.setProgress((int) (videoQuota * 100 / instanceVideoQuota), true);
} else { } else {
@ -115,7 +115,7 @@ public class PeertubeUploadActivity extends AppCompatActivity {
binding.totalQuota.setProgress(progress); binding.totalQuota.setProgress(progress);
} }
} }
if (instanceDailyQuota != -1) { if (instanceDailyQuota != -1 && instanceDailyQuota != 0) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
binding.dailyQuota.setProgress((int) (dailyQuota * 100 / instanceDailyQuota), true); binding.dailyQuota.setProgress((int) (dailyQuota * 100 / instanceDailyQuota), true);
} else { } else {