Skip to content

Commit

Permalink
Fix auto-binding issue in Fragments for 1.5.0. (#86)
Browse files Browse the repository at this point in the history
* Lifted LightCycles of the same class are equals.
* Fix fragment dispatchers bound multiple times.

Related to #36
  • Loading branch information
glung authored Dec 16, 2016
1 parent a0ca7e7 commit 2524b1a
Show file tree
Hide file tree
Showing 21 changed files with 654 additions and 235 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ext.deps = [
compiletesting : 'com.google.testing.compile:compile-testing:0.7',
roboelectric : 'org.robolectric:robolectric:3.1.2',
robolectric_support : 'org.robolectric:shadows-support-v4:3.1.2',
equalsverifier : 'nl.jqno.equalsverifier:equalsverifier:2.1.8'
]

// Static analysis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

import com.soundcloud.lightcycle.ActivityLightCycleDispatcher;
import com.soundcloud.lightcycle.LightCycle;
import com.soundcloud.lightcycle.LightCycles;

import android.os.Bundle;
import android.support.annotation.Nullable;

import javax.inject.Inject;

Expand All @@ -18,10 +14,4 @@ class HomePresenter extends ActivityLightCycleDispatcher<HomeActivity> {
this.headerPresenter = headerPresenter;
this.descriptionPresenter = descriptionPresenter;
}

@Override
public void onCreate(HomeActivity activity, @Nullable Bundle bundle) {
LightCycles.bind(this);
super.onCreate(activity, bundle);
}
}
4 changes: 3 additions & 1 deletion lightcycle-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ checkstyle {
configFile rootProject.file('checkstyle.xml')
showViolations true
}

dependencies {
provided deps.android
provided deps.support_v4

testCompile deps.junit
testCompile deps.equalsverifier
}
Loading

0 comments on commit 2524b1a

Please sign in to comment.