Ignore right click on preview.

This commit is contained in:
John Preston 2024-05-29 10:12:56 +04:00
parent 465fc42718
commit d2e6003521
1 changed files with 13 additions and 10 deletions

View File

@ -426,6 +426,8 @@ void Item::setupHistory() {
_scroll->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
if (e->type() == QEvent::MouseButtonPress) {
const auto button = static_cast<QMouseEvent*>(e.get())->button();
if (button == Qt::LeftButton) {
const auto relative = Ui::MapFrom(
_inner.data(),
_scroll.get(),
@ -438,6 +440,7 @@ void Item::setupHistory() {
_actions.fire(ChatPreviewAction{});
}
}
}
}, lifetime());
_inner->resizeToWidth(_scroll->width(), _scroll->height());