Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling EpoxyController.notifyModelChanged() is causing a crash #1361

Open
blah1234 opened this issue Jul 31, 2023 · 0 comments
Open

Calling EpoxyController.notifyModelChanged() is causing a crash #1361

blah1234 opened this issue Jul 31, 2023 · 0 comments

Comments

@blah1234
Copy link
Contributor

Is EpoxyController.notifyModelChanged() a supported API? If I try calling that method on a Typed2EpoxyController, in some cases it causes a crash. And looking at the code base, the crash path is clear:

EpoxyController.notifyModelChanged() -> requestModelBuild() -> and then Typed2EpoxyController throws the IllegalStateException():

public final void requestModelBuild() {
    if (!allowModelBuildRequests) {
      throw new IllegalStateException(
          "You cannot call `requestModelBuild` directly. Call `setData` instead to trigger a "
              + "model refresh with new data.");
    }
    super.requestModelBuild();
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant