Skip to content

Commit

Permalink
Fix progress visibility when upload failed
Browse files Browse the repository at this point in the history
  • Loading branch information
0ranko0P committed Jul 20, 2020
1 parent c54a877 commit b9e934d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BlockListActivity : BaseListActivity(), View.OnFocusChangeListener {

Constant.JOB_STATUS_SUCCEED -> showMessage(R.string.app_upload_success)

Constant.JOB_STATUS_FAILED -> {binding.progressText.setText(R.string.app_upload_fail)}
Constant.JOB_STATUS_FAILED -> binding.progressText.setText(R.string.app_upload_fail)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_block_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:visibility="@{(viewModel.uploadStatus == Constant.JOB_STATUS_PENDING) ? View.VISIBLE : View.INVISIBLE}">
android:visibility="@{(viewModel.uploadStatus == Constant.JOB_STATUS_PENDING || viewModel.uploadStatus == Constant.JOB_STATUS_FAILED) ? View.VISIBLE : View.INVISIBLE}">

<ProgressBar
android:layout_width="64dp"
Expand All @@ -81,7 +81,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:visibility="@{(viewModel.uploadStatus == Constant.JOB_STATUS_PENDING) ? View.INVISIBLE : View.VISIBLE}"
android:visibility="@{(viewModel.uploadStatus == Constant.JOB_STATUS_PENDING || viewModel.uploadStatus == Constant.JOB_STATUS_FAILED) ? View.INVISIBLE : View.VISIBLE}"
tools:visibility="visible">

<androidx.recyclerview.widget.RecyclerView
Expand Down

0 comments on commit b9e934d

Please sign in to comment.