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

Commit

Permalink
Add peek method in Router to display current active screen (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Chiu committed Apr 29, 2016
1 parent f3dc76c commit 4dd0853
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scoop/src/main/java/com/lyft/scoop/Router.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public boolean hasActiveScreen() {
return !backStack.isEmpty();
}

protected Screen peek() {
return backStack.peek();
}

private boolean tryHandleEmptyBackstack(final Screen screen) {
if (backStack.isEmpty()) {
backStack.push(screen);
Expand Down

0 comments on commit 4dd0853

Please sign in to comment.