question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

toList() does not work

See original GitHub issue

I have one Observable below .

ComApi.getInstance().getRegionList().compose(RxUtil.background())
                .filter(resRegionModel -> resRegionModel != null)
                .map(ResRegionsModel::getData)
                .flatMap(Observable::from)
                .filter(dataEntity -> dataEntity != null)
                .map(this::convert)
                .doOnNext(adapter::replaceWith)  // this can work, it will receive data one by one.
                .toList()
                .doOnNext(adapter::replaceWith) // but this callback will not be called .while after toList()..it can 
                                                                      // not receive data by once. 
                .doOnError(Throwable::printStackTrace)
                .subscribe();

this is my first catch problem while I using toList(). I don’t know how to fix this issue.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sharyukecommented, Mar 22, 2016

Did You meaning I must call subscriber.onComplete() method? let me have a try.

0reactions
sharyukecommented, Mar 22, 2016

@akarnokd yes! You are right! it worked!!! thanks a lot !!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Returning to view as ToList() not working - Stack Overflow
ToList() extension method is defined: using System.Linq;. to the top of your file. ... Linq regardless of whether you are using Entity Framework...
Read more >
System.Linq.Enumerable.ToList() could not work in imemdiate ...
When I execute “ToList()” in inmediate window, it will throw a error:" Evaluation of method System.Linq.Enumerable.ToList(System.Collections.Generic.
Read more >
ToList() and ToArray() not found - MSDN - Microsoft
ToArray() and ToList() started working fine when i imported the System.Query namespace. Now, when i installed the new version of DLinq RemoveAll ...
Read more >
toList() function | Help - Zoho Deluge
The toList function takes source text and a separator as arguments. The source text is tokenised using the separator. All tokens are then...
Read more >
It is not a problem: Cannot resolve method 'toList' in 'Stream'
Why it is not a problem? Stream.toList() is a method in Java/JDK 17, which we uses, and interestingly Qodana also suggest the following:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found