mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-16 15:12:13 +00:00
Fix jump to original from story repost.
This commit is contained in:
parent
1061fb6c85
commit
1e0002aa74
@ -933,6 +933,13 @@ void Controller::show(
|
|||||||
peer->updateFull();
|
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) {
|
bool Controller::changeShown(Data::Story *story) {
|
||||||
const auto id = story ? story->fullId() : FullStoryId();
|
const auto id = story ? story->fullId() : FullStoryId();
|
||||||
const auto session = story ? &story->session() : nullptr;
|
const auto session = story ? &story->session() : nullptr;
|
||||||
|
@ -141,6 +141,7 @@ public:
|
|||||||
-> HistoryView::Reactions::CachedIconFactory &;
|
-> HistoryView::Reactions::CachedIconFactory &;
|
||||||
|
|
||||||
void show(not_null<Data::Story*> story, Data::StoriesContext context);
|
void show(not_null<Data::Story*> story, Data::StoriesContext context);
|
||||||
|
void jumpTo(not_null<Data::Story*> story, Data::StoriesContext context);
|
||||||
void ready();
|
void ready();
|
||||||
|
|
||||||
void updateVideoPlayback(const Player::TrackState &state);
|
void updateVideoPlayback(const Player::TrackState &state);
|
||||||
|
@ -178,7 +178,7 @@ RepostClickHandler RepostView::lookupHandler(QPoint position) {
|
|||||||
const auto of = owner->stories().lookup({ peer->id, id });
|
const auto of = owner->stories().lookup({ peer->id, id });
|
||||||
if (of) {
|
if (of) {
|
||||||
using namespace Data;
|
using namespace Data;
|
||||||
_controller->show(*of, { StoriesContextSingle() });
|
_controller->jumpTo(*of, { StoriesContextSingle() });
|
||||||
} else {
|
} else {
|
||||||
_controller->uiShow()->show(PrepareShortInfoBox(peer));
|
_controller->uiShow()->show(PrepareShortInfoBox(peer));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user