Fix opening a forwarded GIF in MediaView on click.

Fixes #3645
This commit is contained in:
John Preston 2017-07-11 13:21:01 +03:00
parent 06d4ea2975
commit d94ef82327
1 changed files with 3 additions and 1 deletions

View File

@ -1750,7 +1750,6 @@ HistoryGif::HistoryGif(gsl::not_null<HistoryItem*> parent, DocumentData *documen
, _data(document)
, _caption(st::minPhotoSize - st::msgPadding.left() - st::msgPadding.right()) {
setDocumentLinks(_data, true);
_openInMediaviewLink = MakeShared<DocumentOpenClickHandler>(_data);
setStatusSize(FileStatusSizeReady);
@ -1775,6 +1774,9 @@ void HistoryGif::initDimensions() {
if (_caption.hasSkipBlock()) {
_caption.setSkipBlock(_parent->skipBlockWidth(), _parent->skipBlockHeight());
}
if (!_openInMediaviewLink) {
_openInMediaviewLink = MakeShared<DocumentOpenClickHandler>(_data);
}
bool bubble = _parent->hasBubble();
int32 tw = 0, th = 0;