2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

links preview done

This commit is contained in:
John Preston
2015-04-04 23:01:34 +03:00
parent 868d5f60f3
commit f3bb155b0a
67 changed files with 2712 additions and 1416 deletions

View File

@@ -517,7 +517,19 @@ void MediaView::showPhoto(PhotoData *photo) {
_x = (_avail.width() - _w) / 2;
_y = st::medviewPolaroid.top() + (_avail.height() - st::medviewPolaroid.top() - st::medviewPolaroid.bottom() - st::medviewBottomBar - _h) / 2;
_width = _w;
_from = App::user(_photo->user);
if (_photo->user == WebPageUserId && _msgid) {
if (HistoryItem *item = App::histItemById(_msgid)) {
if (dynamic_cast<HistoryForwarded*>(item)) {
_from = static_cast<HistoryForwarded*>(item)->fromForwarded();
} else {
_from = item->from();
}
} else {
_from = App::user(_photo->user);
}
} else {
_from = App::user(_photo->user);
}
updateControls();
_photo->full->load();
if (isHidden()) {