Open hctangaa opened 4 years ago
Quoting from the docs:
Be aware that since this applies the option {@link com.airbnb.epoxy.ModelProp.Option#DoNotHash} changing the value of the listener will not trigger an update to the view.
In other words, updating the model won't update the callback.
Workaround: set the model directly in the ModelView
, and use it in the callback.
Quoting from the docs:
Be aware that since this applies the option {@link com.airbnb.epoxy.ModelProp.Option#DoNotHash} changing the value of the listener will not trigger an update to the view.
In other words, updating the model won't update the callback.
Workaround: set the model directly in the
ModelView
, and use it in the callback.
I think my problem does not really relate to the callback. Because I did not update the callback, the callback is always the same callback and could be hashed.
Simply asking, my question is i am not able to trigger force model build inside PagedListEpoxyController
when the dataset in unchanged. While the changing parameter is not inside the dataset (i.e. for example when toggling edit mode, the dataset is still unchanged while one a param in the controller changed. )
I have a similar issue. My epoxy stops calling bind functions (neither of them) for anything else than a change in one EpoxyAttribute in my EpoxyModelWithHolder class after that attribute is changed the first time. In my case, it's editMode attribute that on bind() triggers all items to animate and transition using MotionLayout (I tried commenting that one out completely and the issue still remains). It's super weird and I cannot find a solution and I've been looking for eternity. This seems a similar issue.
I set the data, buildModels() gets called with different data set, but bind functions of the model are no longer called after I change that one attribute to true (editMode) for the first time, and the bind is only called when that attribute is changed later on and not in any other case... There is a bunch of other EpoxyAttributes that I want to change later with new buildModels() calls but it no longer reacts to the changes.
Background I am doing a messaging app. The message sdk I used return the messages in a paged format and thats why I am use the PagedListEpoxyController.
Inside a chat room, user can chat and also select multiple messages to copy or delete (just like whatsapp or telegram)
Current Situtation
(Part of the codes)
When I long press the item, its fire a event to update the state and then after the state is updated, it trigger
rebuildList()
. For the log, I can see that therebuildList()
is successfully called (i.e.selectionState.isSelectionMode
is updated) but the model is not updated accordingly. I believed that it is because old and newly built model has the samehashCode
andequal() = true
.I am just wonder why even
selectionState.isSelectionMode
is updated, while the epoxy did not detect any difference.TextMessageSelfRowModel_()
is a generated model generated fromTextMessageSelfRow