Created
October 30, 2017 15:06
-
-
Save Ulop/747ad6b53266d8296b7e19fa7f58a868 to your computer and use it in GitHub Desktop.
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
@InjectPresenter(type = PresenterType.GLOBAL) | |
lateinit var presenter: EventPresenter | |
@ProvidePresenterTag(presenterClass = EventPresenter::class, type = PresenterType.GLOBAL) | |
fun providePresenterTag(): String { | |
return "PRESENTER_EVENT_$mvpChildId" | |
} | |
var item: Event? = null | |
set(value) { | |
destroyMvpDelegate() | |
field = value | |
createMvpDelegate() | |
} | |
override val mvpChildId: String? | |
get() = item?.id | |
fun bind(event: Event) { | |
item = event | |
item?.let { item -> | |
presenter.id = item.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment