2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-05 13:16:13 +00:00

Fixed updating of parent id for file click handlers.

Fixed #16447.
This commit is contained in:
23rd
2021-06-18 07:22:47 +03:00
parent 3fd772ce17
commit 6c56fad180
10 changed files with 66 additions and 57 deletions

View File

@@ -62,15 +62,15 @@ DocumentClickHandler::DocumentClickHandler(
DocumentOpenClickHandler::DocumentOpenClickHandler(
not_null<DocumentData*> document,
Fn<void()> &&callback)
: DocumentClickHandler(document)
Fn<void(FullMsgId)> &&callback,
FullMsgId context)
: DocumentClickHandler(document, context)
, _handler(std::move(callback)) {
Expects(_handler != nullptr);
}
void DocumentOpenClickHandler::onClickImpl() const {
if (_handler) {
_handler();
}
_handler(context());
}
void DocumentSaveClickHandler::Save(
@@ -170,15 +170,15 @@ PeerData *PhotoClickHandler::peer() const {
PhotoOpenClickHandler::PhotoOpenClickHandler(
not_null<PhotoData*> photo,
Fn<void()> &&callback)
: PhotoClickHandler(photo)
Fn<void(FullMsgId)> &&callback,
FullMsgId context)
: PhotoClickHandler(photo, context)
, _handler(std::move(callback)) {
Expects(_handler != nullptr);
}
void PhotoOpenClickHandler::onClickImpl() const {
if (_handler) {
_handler();
}
_handler(context());
}
void PhotoSaveClickHandler::onClickImpl() const {