so i've got a stateless ListView based widget filled by a viewmodel and a singleton service. when i scroll to the end of the ListView, the widget successfully relays a call to replaceMore() and those new comments pop in to the ListView.
When I scroll to the new bottom and encounter the second MoreComments object, I get an exception. The assertion it fails on suggests to that the insert is being called on a Comment which already exists in the Submission's comment list.
Not sure if this is a bug or pebkac. I don't see how replaceMore could run into a comment that already exists if i'm awaiting it between calls.
[RedditService] loading discussion thread...
[RedditService] found dt: https://redd.itgt9vt5
[RedditService] dt populated: Discussion Thread (75 comments)
... scroll to bottom ...
[DtViewModel] found morecomments: fsab9qd
[RedditService] asked to replace MoreComments objs. status: false currentDt.comments.length=75
[RedditService] replacement complete. status: false currentDt.comments.length=84
... scroll to new bottom ...
[DtViewModel] found morecomments: fsabd63
[RedditService] asked to replace MoreComments objs. status: false currentDt.comments.length=84
[RedditService] 'package:draw/src/models/comment_forest.dart': Failed assertion: line 41 pos 12: '(comment is MoreComments) ||
((comment…
so i've got a stateless ListView based widget filled by a viewmodel and a singleton service. when i scroll to the end of the ListView, the widget successfully relays a call to
replaceMore()
and those new comments pop in to the ListView.When I scroll to the new bottom and encounter the second MoreComments object, I get an exception. The assertion it fails on suggests to that the insert is being called on a Comment which already exists in the Submission's comment list.
Not sure if this is a bug or pebkac. I don't see how replaceMore could run into a comment that already exists if i'm
await
ing it between calls.