2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Removed App::wnd from classes that have pointer to Window::Controller.

This commit is contained in:
23rd
2021-02-03 06:31:11 +03:00
committed by John Preston
parent 0783a682dc
commit 0b4d0b83c2
12 changed files with 71 additions and 79 deletions

View File

@@ -473,11 +473,9 @@ void StickerSetBox::Inner::mouseMoveEvent(QMouseEvent *e) {
int index = stickerFromGlobalPos(e->globalPos());
if (index >= 0 && index < _pack.size() && index != _previewShown) {
_previewShown = index;
if (const auto w = App::wnd()) {
w->showMediaPreview(
Data::FileOriginStickerSet(_setId, _setAccess),
_pack[_previewShown]);
}
_controller->widget()->showMediaPreview(
Data::FileOriginStickerSet(_setId, _setAccess),
_pack[_previewShown]);
}
}
}
@@ -536,11 +534,9 @@ void StickerSetBox::Inner::showPreview() {
int index = stickerFromGlobalPos(QCursor::pos());
if (index >= 0 && index < _pack.size()) {
_previewShown = index;
if (const auto w = App::wnd()) {
w->showMediaPreview(
Data::FileOriginStickerSet(_setId, _setAccess),
_pack[_previewShown]);
}
_controller->widget()->showMediaPreview(
Data::FileOriginStickerSet(_setId, _setAccess),
_pack[_previewShown]);
}
}