Fix a crash in saved stories layer management.

This commit is contained in:
John Preston 2023-06-20 18:24:40 +04:00
parent e98770d418
commit 738e20252e
1 changed files with 6 additions and 0 deletions

View File

@ -244,6 +244,12 @@ Dialogs::RowDescriptor WrapWidget::activeChat() const {
return Dialogs::RowDescriptor(
peer->owner().history(peer),
FullMsgId());
} else if (const auto storiesPeer = key().storiesPeer()) {
return (key().storiesTab() == Stories::Tab::Saved)
? Dialogs::RowDescriptor(
storiesPeer->owner().history(storiesPeer),
FullMsgId())
: Dialogs::RowDescriptor();
} else if (key().settingsSelf() || key().isDownloads() || key().poll()) {
return Dialogs::RowDescriptor();
}