mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 23:55:12 +00:00
Slightly refactored display of media preview.
- Removed showMediaPreview from facades.
This commit is contained in:
@@ -1030,9 +1030,11 @@ void FieldAutocompleteInner::selectByMouse(QPoint globalPosition) {
|
||||
if (_down >= 0 && _sel >= 0 && _down != _sel) {
|
||||
_down = _sel;
|
||||
if (_down >= 0 && _down < _srows->size()) {
|
||||
Ui::showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
if (const auto w = App::wnd()) {
|
||||
w->showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1050,10 +1052,12 @@ void FieldAutocompleteInner::onParentGeometryChanged() {
|
||||
|
||||
void FieldAutocompleteInner::showPreview() {
|
||||
if (_down >= 0 && _down < _srows->size()) {
|
||||
Ui::showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
_previewShown = true;
|
||||
if (const auto w = App::wnd()) {
|
||||
w->showMediaPreview(
|
||||
(*_srows)[_down].document->stickerSetOrigin(),
|
||||
(*_srows)[_down].document);
|
||||
_previewShown = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user