mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Removed App::wnd from classes that have pointer to Window::Controller.
This commit is contained in:
@@ -1280,11 +1280,9 @@ void FieldAutocomplete::Inner::selectByMouse(QPoint globalPosition) {
|
||||
if (_down >= 0 && _sel >= 0 && _down != _sel) {
|
||||
_down = _sel;
|
||||
if (_down >= 0 && _down < _srows->size()) {
|
||||
if (const auto w = App::wnd()) {
|
||||
w->showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
}
|
||||
_controller->widget()->showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1302,12 +1300,10 @@ void FieldAutocomplete::Inner::onParentGeometryChanged() {
|
||||
|
||||
void FieldAutocomplete::Inner::showPreview() {
|
||||
if (_down >= 0 && _down < _srows->size()) {
|
||||
if (const auto w = App::wnd()) {
|
||||
w->showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
_previewShown = true;
|
||||
}
|
||||
_controller->widget()->showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
_previewShown = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user