2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Show GIF in Mediaview on click.

This way you can watch GIF on full screen and switch between them.
This commit is contained in:
John Preston
2017-05-18 16:22:57 +03:00
parent 2377873c45
commit efb59e8c3a
9 changed files with 61 additions and 29 deletions

View File

@@ -368,7 +368,7 @@ void MediaView::updateControls() {
_dateNav = myrtlrect(st::mediaviewTextLeft, height() - st::mediaviewTextTop, st::mediaviewFont->width(_dateText), st::mediaviewFont->height);
}
updateHeader();
if (_photo || (_history && (_overview == OverviewPhotos || _overview == OverviewChatPhotos || _overview == OverviewFiles || _overview == OverviewVideos))) {
if (_photo || (_history && _overview != OverviewCount)) {
_leftNavVisible = (_index > 0) || (_index == 0 && (
(!_msgmigrated && _history && _history->overview[_overview].size() < _history->overviewCount(_overview)) ||
(_msgmigrated && _migrated && _migrated->overview[_overview].size() < _migrated->overviewCount(_overview)) ||
@@ -1152,7 +1152,7 @@ void MediaView::showDocument(DocumentData *doc, HistoryItem *context) {
_canForward = _msgid > 0;
_canDelete = context ? context->canDelete() : false;
if (_history) {
_overview = doc->isVideo() ? OverviewVideos : OverviewFiles;
_overview = doc->isGifv() ? OverviewGIFs : doc->isVideo() ? OverviewVideos : OverviewFiles;
findCurrent();
}
if (doc->isVideo() || doc->isRoundVideo()) {
@@ -2153,7 +2153,7 @@ bool MediaView::moveToNext(int32 delta) {
}
return false;
}
if ((_history && _overview != OverviewPhotos && _overview != OverviewChatPhotos && _overview != OverviewFiles && _overview != OverviewVideos) || (_overview == OverviewCount && !_user)) {
if (_overview == OverviewCount && (_history || !_user)) {
return false;
}
if (_msgmigrated && !_history->overviewLoaded(_overview)) {