mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
new photoviewer adapted for documents
This commit is contained in:
@@ -1225,9 +1225,9 @@ void OverviewInner::saveContextFile() {
|
||||
VideoLink *lnkVideo = dynamic_cast<VideoLink*>(_contextMenuLnk.data());
|
||||
AudioLink *lnkAudio = dynamic_cast<AudioLink*>(_contextMenuLnk.data());
|
||||
DocumentLink *lnkDocument = dynamic_cast<DocumentLink*>(_contextMenuLnk.data());
|
||||
if (lnkVideo) VideoSaveLink(lnkVideo->video()).doSave(true);
|
||||
if (lnkAudio) AudioSaveLink(lnkAudio->audio()).doSave(true);
|
||||
if (lnkDocument) DocumentSaveLink(lnkDocument->document()).doSave(true);
|
||||
if (lnkVideo) VideoSaveLink::doSave(lnkVideo->video(), true);
|
||||
if (lnkAudio) AudioSaveLink::doSave(lnkAudio->audio(), true);
|
||||
if (lnkDocument) DocumentSaveLink::doSave(lnkDocument->document(), true);
|
||||
}
|
||||
|
||||
void OverviewInner::openContextFile() {
|
||||
@@ -1355,6 +1355,7 @@ void OverviewInner::mediaOverviewUpdated() {
|
||||
prevDate = date;
|
||||
}
|
||||
int32 w = _width - st::msgMargin.left() - st::msgMargin.right();
|
||||
media->initDimensions(item);
|
||||
y += media->countHeight(item, w) + st::msgMargin.top() + st::msgMargin.bottom(); // item height
|
||||
if (_items.size() > in) {
|
||||
_items[in].msgid = msgid;
|
||||
|
Reference in New Issue
Block a user