Created
November 17, 2019 19:11
-
-
Save hamadycisse/e72faa6308bff8a65678a33a931a8619 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class OurAppInjectionScopes(private val appComponent: AppComponent) : AppInjectionScopes { | |
override val isInUserScope: Boolean | |
get() = userScope != null | |
override var userScope: UserScopeSubcomponent? = null | |
private set | |
override fun openUserScope() { | |
userScope = appComponent.getUserScopeSubcomponentFactory().create() | |
} | |
override fun closeUserScope() { | |
userScope = userScope?.run { | |
notifier.dispose() | |
null | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment