mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix jump to original from story repost.
This commit is contained in:
parent
1061fb6c85
commit
1e0002aa74
3 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue