mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix comments loading. Fixes #25889.
This commit is contained in:
parent
d41961945d
commit
49b59d73be
1 changed files with 6 additions and 2 deletions
|
@ -3788,8 +3788,6 @@ void ListWidget::viewReplaced(not_null<const Element*> was, Element *now) {
|
|||
}
|
||||
|
||||
void ListWidget::itemRemoved(not_null<const HistoryItem*> item) {
|
||||
saveScrollState();
|
||||
|
||||
if (_reactionsItem.current() == item) {
|
||||
_reactionsItem = nullptr;
|
||||
}
|
||||
|
@ -3806,6 +3804,12 @@ void ListWidget::itemRemoved(not_null<const HistoryItem*> item) {
|
|||
if (i == end(_views)) {
|
||||
return;
|
||||
}
|
||||
|
||||
saveScrollState();
|
||||
const auto guard = gsl::finally([&] {
|
||||
restoreScrollState();
|
||||
});
|
||||
|
||||
const auto view = i->second.get();
|
||||
_items.erase(
|
||||
ranges::remove(_items, view, [](auto view) { return view.get(); }),
|
||||
|
|
Loading…
Add table
Reference in a new issue