Skip to content

Commit 540997b

Browse files
author
Dmytro Khmelenko
committed
Fix showing progress dialog in Repositories screen
1 parent 855ff7c commit 540997b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/com/khmelenko/lab/travisclient/fragment/ReposFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,14 @@ public void setRepos(List<Repo> repos) {
157157
*/
158158
public void setLoadingProgress(boolean isLoading) {
159159
if (isLoading) {
160-
mProgressDialog = ProgressDialog.show(getActivity(), "", getString(R.string.loading_msg));
160+
if(mProgressDialog == null) {
161+
mProgressDialog = ProgressDialog.show(getActivity(), "", getString(R.string.loading_msg));
162+
}
161163
} else {
162164
mSwipeRefreshLayout.setRefreshing(false);
163165
if(mProgressDialog != null) {
164166
mProgressDialog.dismiss();
167+
mProgressDialog = null;
165168
}
166169
}
167170
}

0 commit comments

Comments
 (0)