Go to Chat on Shift+Enter in Forward box (#300)
This commit is contained in:
parent
55e1a74d12
commit
3297441898
1 changed files with 9 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ public:
|
|||
|
||||
std::vector<not_null<PeerData*>> selected() const;
|
||||
bool hasSelected() const;
|
||||
Fn<void()> goToChatRequest() const;
|
||||
|
||||
void peopleReceived(
|
||||
const QString &query,
|
||||
|
|
@ -277,6 +278,10 @@ void ShareBox::prepare() {
|
|||
if ((modifiers.testFlag(Qt::ControlModifier) && !cForwardChatOnClick())
|
||||
|| modifiers.testFlag(Qt::MetaModifier)) {
|
||||
submit({});
|
||||
} else if (modifiers.testFlag(Qt::ShiftModifier)) {
|
||||
if (_inner->selected().size() == 1 && _inner->goToChatRequest()) {
|
||||
_inner->goToChatRequest()();
|
||||
}
|
||||
} else {
|
||||
_inner->selectActive();
|
||||
if (!modifiers.testFlag(Qt::ControlModifier) || cForwardChatOnClick()) {
|
||||
|
|
@ -1198,6 +1203,10 @@ bool ShareBox::Inner::hasSelected() const {
|
|||
return _selected.size();
|
||||
}
|
||||
|
||||
Fn<void()> ShareBox::Inner::goToChatRequest() const {
|
||||
return _goToChatRequest;
|
||||
}
|
||||
|
||||
void ShareBox::Inner::updateFilter(QString filter) {
|
||||
_lastQuery = filter.toLower().trimmed();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue