Fix context menu on sent images / documents.

This commit is contained in:
John Preston
2022-01-17 15:12:14 +03:00
parent c5e7048a3d
commit 1657c2c7f2
7 changed files with 42 additions and 50 deletions
@@ -46,8 +46,8 @@ DocumentClickHandler::DocumentClickHandler(
: FileClickHandler(context)
, _document(document) {
setProperty(
kDocumentLinkMediaIdProperty,
QVariant(qulonglong(_document->id)));
kDocumentLinkMediaProperty,
reinterpret_cast<qulonglong>(_document.get()));
}
DocumentOpenClickHandler::DocumentOpenClickHandler(
@@ -150,7 +150,9 @@ PhotoClickHandler::PhotoClickHandler(
: FileClickHandler(context)
, _photo(photo)
, _peer(peer) {
setProperty(kPhotoLinkMediaIdProperty, QVariant(qulonglong(_photo->id)));
setProperty(
kPhotoLinkMediaProperty,
reinterpret_cast<qulonglong>(_photo.get()));
}
not_null<PhotoData*> PhotoClickHandler::photo() const {