mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Handle only left click on voice chat bar.
This commit is contained in:
parent
9e79b59cce
commit
05ffc79539
1 changed files with 7 additions and 2 deletions
|
@ -220,7 +220,9 @@ void GroupCallBar::setupInner() {
|
|||
_inner->setCursor(style::cur_pointer);
|
||||
_inner->events(
|
||||
) | rpl::filter([=](not_null<QEvent*> event) {
|
||||
return (event->type() == QEvent::MouseButtonPress);
|
||||
return (event->type() == QEvent::MouseButtonPress)
|
||||
&& (static_cast<QMouseEvent*>(event.get())->button()
|
||||
== Qt::LeftButton);
|
||||
}) | rpl::map([=] {
|
||||
return _inner->events(
|
||||
) | rpl::filter([=](not_null<QEvent*> event) {
|
||||
|
@ -441,7 +443,10 @@ rpl::producer<> GroupCallBar::barClicks() const {
|
|||
}
|
||||
|
||||
rpl::producer<> GroupCallBar::joinClicks() const {
|
||||
return _joinClicks.events() | rpl::to_empty;
|
||||
using namespace rpl::mappers;
|
||||
return _joinClicks.events()
|
||||
| rpl::filter(_1 == Qt::LeftButton)
|
||||
| rpl::to_empty;
|
||||
}
|
||||
|
||||
} // namespace Ui
|
||||
|
|
Loading…
Add table
Reference in a new issue