Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
validating again if repo has an issue or no to disable going to issue…
Browse files Browse the repository at this point in the history
…sPagerView
  • Loading branch information
Kosh committed Feb 24, 2017
1 parent 51dea58 commit 95049cd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ class RepoPagerPresenter extends BasePresenter<RepoPagerMvp.View> implements Rep
}
break;
case RepoPagerMvp.ISSUES:
if ((getRepo() != null && !getRepo().isHasIssues())) return;
if (repoIssuesPagerView == null) {
onAddAndHide(fragmentManager, RepoIssuesPagerView.newInstance(repoId(), login()), currentVisible);
} else {
Expand Down Expand Up @@ -272,6 +273,9 @@ class RepoPagerPresenter extends BasePresenter<RepoPagerMvp.View> implements Rep
}

@Override public void onMenuItemSelect(@IdRes int id, int position, boolean fromUser) {
if (id == R.id.issues && (getRepo() != null && !getRepo().isHasIssues())) {
return;
}
if (getView() != null && isViewAttached()) {
getView().onNavigationChanged(position);
}
Expand Down

0 comments on commit 95049cd

Please sign in to comment.