Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #63 from Karumi/check-if-rosie-application-is-used…
Browse files Browse the repository at this point in the history
…-before-to-downcast

Fix #59.
  • Loading branch information
pedrovgs committed Apr 4, 2016
2 parents 84fca45 + a7e0b38 commit bd7f557
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rosie/src/main/java/com/karumi/rosie/view/RosieActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ private boolean shouldInitializeActivityScopeGraph() {
}

private void injectActivityModules() {
if (!(getApplication() instanceof RosieApplication)) {
return;
}
RosieApplication rosieApplication = (RosieApplication) getApplication();
List<Object> additionalModules = getActivityScopeModules();
if (additionalModules == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ protected final void registerPresenter(RosiePresenter presenter) {
}

private void injectActivityModules() {
if (!(getApplication() instanceof RosieApplication)) {
return;
}
RosieApplication rosieApplication = (RosieApplication) getApplication();
List<Object> additionalModules = getActivityScopeModules();
if (additionalModules == null) {
Expand Down

0 comments on commit bd7f557

Please sign in to comment.