mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix crash after spoiler reveal in comments.
This commit is contained in:
parent
09a6df1fdc
commit
0e6c899cee
1 changed files with 2 additions and 1 deletions
|
@ -1572,7 +1572,6 @@ rpl::producer<not_null<const HistoryItem*>> Session::itemRemoved(
|
|||
}
|
||||
|
||||
void Session::notifyViewRemoved(not_null<const ViewElement*> view) {
|
||||
_shownSpoilers.remove(view);
|
||||
_viewRemoved.fire_copy(view);
|
||||
}
|
||||
|
||||
|
@ -3707,6 +3706,8 @@ void Session::registerItemView(not_null<ViewElement*> view) {
|
|||
void Session::unregisterItemView(not_null<ViewElement*> view) {
|
||||
Expects(!_heavyViewParts.contains(view));
|
||||
|
||||
_shownSpoilers.remove(view);
|
||||
|
||||
const auto i = _views.find(view->data());
|
||||
if (i != end(_views)) {
|
||||
auto &list = i->second;
|
||||
|
|
Loading…
Add table
Reference in a new issue