idanatz / OneAdapter

A Viewholderless Adapter for RecyclerView, who supports builtin diffing, states (paging, empty...), events (clicking, swiping...), and more.
MIT License
470 stars 45 forks source link

Typo in readme #19

Closed meruiden closed 4 years ago

meruiden commented 4 years ago

The readme docs for adding event hooks show the following example code:

val oneAdapter = OneAdapter(recyclerView)
    .attachItemModule(MessageModule()).addEventHook(MessageClickEvent())
    ...

there is a parenthese misplaced.

Correct:

val oneAdapter = OneAdapter(recyclerView)
    .attachItemModule(MessageModule().addEventHook(MessageClickEvent()))
    ...
meruiden commented 4 years ago

And the ClickEventHook still returns the old model rather then the new Item model containing the metadata

idanatz commented 4 years ago

Thanks, you are correct. Regarding the event hook, will be wrapped with Item<> in the next version 👍🏼