Giter VIP home page Giter VIP logo

Comments (9)

idanatz avatar idanatz commented on July 17, 2024

Thanks for the reports, will be fixed and covered in test in the next release.

from oneadapter.

vellrya avatar vellrya commented on July 17, 2024

Also I checked for #37 issue.
There is no crash now in 2.1.0, but it is possible to achieve that after a certain amount of quick removal of all items and adding them back, the setItems method just stops working - the adapter remains empty, even if you pass some objects there.

Upd: If we call layoutManager.scrollToPositionWithOffset(position, 0) on broken empty adapter, then elements appear - probably this information can help in debug problem.

from oneadapter.

idanatz avatar idanatz commented on July 17, 2024

I've tried to simulate the behavior you mention:

  • with multiple search views, simple and complex
  • with manual and simulated monkey testing (random input to an edit text with random pace)
  • with and without multiple item modules
  • with and without emptiness module
    I could not reach an invalid state.

can you share the simplest project you can that this behavior is reproducible?

from oneadapter.

vellrya avatar vellrya commented on July 17, 2024

Spent almost an hour to be able to strongly reproduce bug, but I did it))
I send you a video for reproducing steps and sample project later.

from oneadapter.

vellrya avatar vellrya commented on July 17, 2024

https://github.com/vellrya/OneAdapter_Issue

Watch reproduce.mp4 video, bug appeared at ~0:40
Seems like this happened after we call setItems on empty adapter (when search substring reduced) after fast changing it's data

from oneadapter.

idanatz avatar idanatz commented on July 17, 2024

Thanks for the help.
I'm still trying to figure this behavior out - if it's my library or the extended Android adapter bug, and how to work around it.

from oneadapter.

vellrya avatar vellrya commented on July 17, 2024

Now I switched to ListAdapter for this particular RecyclerView and cannot reproduce this error more.
But of course I had to write a lot of boilerplate code and there is no support for pagination and a lot of other features of your library)
Also, it seemed to me that with ListAdapter the work of RecyclerView became smoother, could this be?

from oneadapter.

idanatz avatar idanatz commented on July 17, 2024

Honestly, ListAdapter is implemented by using AsyncListDiffer, which OneAdapter uses as well.
The implementations are basically identical, but as you said with fewer features, hence maybe there is a slim benefit to the "Valina" version.

This is why this bug is so weird and even more, if it does not reproduce on ListAdapter.
The entire state of the adapter is correct and keeps updating but the recycler seems disconnected from it.

Will keep investigating...

from oneadapter.

idanatz avatar idanatz commented on July 17, 2024

The original issue has been fixed on v2.1.1

from oneadapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.