mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
Fix Codacy issues
This commit is contained in:
parent
7862f3a19c
commit
43af519a16
21 changed files with 48 additions and 47 deletions
|
|
@ -34,7 +34,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
|||
views.seqNumView.setText(String.valueOf(cursor.getPosition() + 1));
|
||||
views.seqNumView.setVisibility(View.VISIBLE);
|
||||
|
||||
switch(contribution.getState()) {
|
||||
switch (contribution.getState()) {
|
||||
case Contribution.STATE_COMPLETED:
|
||||
views.stateView.setVisibility(View.GONE);
|
||||
views.progressView.setVisibility(View.GONE);
|
||||
|
|
@ -50,7 +50,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
|||
views.progressView.setVisibility(View.VISIBLE);
|
||||
long total = contribution.getDataLength();
|
||||
long transferred = contribution.getTransferred();
|
||||
if(transferred == 0 || transferred >= total) {
|
||||
if (transferred == 0 || transferred >= total) {
|
||||
views.progressView.setIndeterminate(true);
|
||||
} else {
|
||||
views.progressView.setProgress((int)(((double)transferred / (double)total) * 100));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue