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:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user