2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Improve layer / section exchange for Info.

This commit is contained in:
John Preston
2017-09-20 13:23:57 +03:00
parent b7077eb71d
commit f4d9618487
27 changed files with 426 additions and 214 deletions

View File

@@ -647,11 +647,6 @@ void MediaView::updateMixerVideoVolume() const {
}
void MediaView::close() {
_sharedMedia = nullptr;
_sharedMediaData = base::none;
_userPhotos = nullptr;
_userPhotosData = base::none;
if (_menu) _menu->hideMenu(true);
Messenger::Instance().hideMediaView();
}
@@ -1256,7 +1251,7 @@ void MediaView::displayPhoto(not_null<PhotoData*> photo, HistoryItem *item) {
_caption.setMarkedText(
st::mediaviewCaptionStyle,
photoMsg->getCaption(),
asBot ? _captionBotOptions : _captionTextOptions);
itemTextOptions(item));
}
}
@@ -2728,6 +2723,11 @@ bool MediaView::eventFilter(QObject *obj, QEvent *e) {
void MediaView::setVisible(bool visible) {
if (!visible) {
_sharedMedia = nullptr;
_sharedMediaData = base::none;
_userPhotos = nullptr;
_userPhotosData = base::none;
if (_menu) _menu->hideMenu(true);
_controlsHideTimer.stop();
_controlsState = ControlsShown;
a_cOpacity = anim::value(1, 1);