Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1149 from Meisolsson/master
Whole lot of changes
- Loading branch information
Showing
246 changed files
with
6,714 additions
and
7,936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
app/src/main/java/com/github/pockethub/android/ApplicationComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.github.pockethub.android; | ||
|
||
import android.app.Application; | ||
|
||
import com.github.pockethub.android.core.gist.GistStore; | ||
import com.github.pockethub.android.dagger.ActivityBuilder; | ||
import com.github.pockethub.android.dagger.DialogFragmentBuilder; | ||
import com.github.pockethub.android.dagger.ServiceBuilder; | ||
|
||
import javax.inject.Singleton; | ||
|
||
import dagger.BindsInstance; | ||
import dagger.Component; | ||
import dagger.android.AndroidInjector; | ||
import dagger.android.support.AndroidSupportInjectionModule; | ||
|
||
@Singleton | ||
@Component(modules = { | ||
AndroidSupportInjectionModule.class, | ||
ApplicationModule.class, | ||
PocketHubModule.class, | ||
ActivityBuilder.class, | ||
ServiceBuilder.class, | ||
DialogFragmentBuilder.class, | ||
GitHubModule.class | ||
}) | ||
public interface ApplicationComponent extends AndroidInjector<PocketHub> { | ||
|
||
GistStore gistStore(); | ||
|
||
@Component.Builder | ||
abstract class Builder extends AndroidInjector.Builder<PocketHub> { | ||
|
||
@BindsInstance | ||
abstract Builder application(Application application); | ||
|
||
@Override | ||
public abstract ApplicationComponent build(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/github/pockethub/android/ApplicationModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.github.pockethub.android; | ||
|
||
import android.app.Application; | ||
import android.content.Context; | ||
|
||
import javax.inject.Singleton; | ||
|
||
import dagger.Binds; | ||
import dagger.BindsInstance; | ||
import dagger.Module; | ||
|
||
@Module | ||
abstract class ApplicationModule { | ||
|
||
@Binds | ||
@Singleton | ||
abstract Context provideApplicationContext(Application application); | ||
} |
Oops, something went wrong.