Fix jump to original from story repost.

This commit is contained in:
John Preston 2024-04-02 23:09:26 +04:00
parent 1061fb6c85
commit 1e0002aa74
3 changed files with 9 additions and 1 deletions

View file

@ -933,6 +933,13 @@ void Controller::show(
peer->updateFull();
}
void Controller::jumpTo(
not_null<Data::Story*> story,
Data::StoriesContext context) {
show(story, std::move(context));
_delegate->storiesRedisplay(story);
}
bool Controller::changeShown(Data::Story *story) {
const auto id = story ? story->fullId() : FullStoryId();
const auto session = story ? &story->session() : nullptr;

View file

@ -141,6 +141,7 @@ public:
-> HistoryView::Reactions::CachedIconFactory &;
void show(not_null<Data::Story*> story, Data::StoriesContext context);
void jumpTo(not_null<Data::Story*> story, Data::StoriesContext context);
void ready();
void updateVideoPlayback(const Player::TrackState &state);

View file

@ -178,7 +178,7 @@ RepostClickHandler RepostView::lookupHandler(QPoint position) {
const auto of = owner->stories().lookup({ peer->id, id });
if (of) {
using namespace Data;
_controller->show(*of, { StoriesContextSingle() });
_controller->jumpTo(*of, { StoriesContextSingle() });
} else {
_controller->uiShow()->show(PrepareShortInfoBox(peer));
}