Fixed viewer list not being closable with the escape key (#3734)

This commit is contained in:
xel86 2022-05-14 07:44:18 -04:00 committed by GitHub
parent 46a5c9509e
commit 1bf31889f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View file

@ -22,6 +22,7 @@
- Bugfix: Fixed highlights triggering from own resub messages. (#3707)
- Bugfix: Fixed existing emote popups not being raised from behind other windows when refocusing them on macOS (#3713)
- Bugfix: Fixed automod queue pubsub topic persisting after user change. (#3718)
- Bugfix: Fixed viewer list not closing after pressing escape key. (#3734)
- Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662)
## 2.3.5

View file

@ -1067,6 +1067,27 @@ void Split::showViewerList()
listDoubleClick(resultList->currentItem()->text());
});
HotkeyController::HotkeyMap actions{
{"delete",
[viewerDock](std::vector<QString>) -> QString {
viewerDock->close();
return "";
}},
{"accept", nullptr},
{"reject", nullptr},
{"scrollPage", nullptr},
{"openTab", nullptr},
{"search",
[searchBar](std::vector<QString>) -> QString {
searchBar->setFocus();
searchBar->selectAll();
return "";
}},
};
getApp()->hotkeys->shortcutsForCategory(HotkeyCategory::PopupWindow,
actions, viewerDock);
dockVbox->addWidget(searchBar);
dockVbox->addWidget(loadingLabel);
dockVbox->addWidget(chattersList);