-
Notifications
You must be signed in to change notification settings - Fork 0
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 #25 from Entreco/develop
0.2.1-Barney
- Loading branch information
Showing
93 changed files
with
1,536 additions
and
504 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
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
24 changes: 22 additions & 2 deletions
24
android/DartsScorecard/app/src/main/java/nl/entreco/dartsscorecard/di/setup/Setup01Module.kt
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 |
---|---|---|
@@ -1,18 +1,38 @@ | ||
package nl.entreco.dartsscorecard.di.setup | ||
|
||
import android.content.Context | ||
import dagger.Module | ||
import dagger.Provides | ||
import nl.entreco.dartsscorecard.setup.Setup01Activity | ||
import nl.entreco.dartsscorecard.setup.Setup01Navigator | ||
import nl.entreco.dartsscorecard.setup.players.PlayerEditor | ||
import nl.entreco.data.setup.repository.SharedPreferenceRepo | ||
import nl.entreco.domain.repository.PreferenceRepository | ||
|
||
/** | ||
* Created by Entreco on 20/12/2017. | ||
*/ | ||
@Module | ||
class Setup01Module(private val activity: Setup01Activity) { | ||
class Setup01Module(activity: Setup01Activity) { | ||
|
||
private val navigator = Setup01Navigator(activity) | ||
private val prefs = activity.getSharedPreferences("setup", Context.MODE_PRIVATE) | ||
|
||
@Provides | ||
@Setup01Scope | ||
fun provideNavigator(): Setup01Navigator { | ||
return Setup01Navigator(activity) | ||
return navigator | ||
} | ||
|
||
@Provides | ||
@Setup01Scope | ||
fun providePlayerEditor(): PlayerEditor { | ||
return navigator | ||
} | ||
|
||
@Provides | ||
@Setup01Scope | ||
fun providePreferenceRepo(): PreferenceRepository { | ||
return SharedPreferenceRepo(prefs) | ||
} | ||
} |
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
Oops, something went wrong.