Fix issue #134
This commit is contained in:
parent
0a12020fd8
commit
fcc10f97b5
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue