Ignore right click on preview.
This commit is contained in:
parent
465fc42718
commit
d2e6003521
|
@ -426,6 +426,8 @@ void Item::setupHistory() {
|
||||||
|
|
||||||
_scroll->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
_scroll->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||||
if (e->type() == QEvent::MouseButtonPress) {
|
if (e->type() == QEvent::MouseButtonPress) {
|
||||||
|
const auto button = static_cast<QMouseEvent*>(e.get())->button();
|
||||||
|
if (button == Qt::LeftButton) {
|
||||||
const auto relative = Ui::MapFrom(
|
const auto relative = Ui::MapFrom(
|
||||||
_inner.data(),
|
_inner.data(),
|
||||||
_scroll.get(),
|
_scroll.get(),
|
||||||
|
@ -438,6 +440,7 @@ void Item::setupHistory() {
|
||||||
_actions.fire(ChatPreviewAction{});
|
_actions.fire(ChatPreviewAction{});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
_inner->resizeToWidth(_scroll->width(), _scroll->height());
|
_inner->resizeToWidth(_scroll->width(), _scroll->height());
|
||||||
|
|
Loading…
Reference in New Issue