Added ability to disable menu hiding from items in easy way.

This commit is contained in:
23rd 2022-02-03 01:01:31 +03:00
parent 7d9c442ca9
commit 8618812fd6

View file

@ -63,7 +63,7 @@ rpl::producer<CallbackData> ItemBase::clicks() const {
AbstractButton::clicks() | rpl::to_empty,
_clicks.events()
) | rpl::filter([=] {
return isEnabled();
return isEnabled() && !AbstractButton::isDisabled();
}) | rpl::map([=]() -> CallbackData {
return { action(), y(), _lastTriggeredSource, _index, true };
});