mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
feat: /clearmessages command (#2485)
This commit is contained in:
parent
fd3efe0e15
commit
49bd1bd488
|
@ -7,6 +7,7 @@
|
|||
- Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001, #2316, #2342, #2376)
|
||||
- Major: Color mentions to match the mentioned users. You can disable this by unchecking "Color @usernames" under `Settings -> General -> Advanced (misc.)`. (#1963, #2284)
|
||||
- Major: Commands `/ignore` and `/unignore` have been renamed to `/block` and `/unblock` in order to keep consistency with Twitch's terms. (#2370)
|
||||
- Minor: Added `/clearmessages` command - does what "Burger menu -> More -> Clear messages" does. (#2485)
|
||||
- Minor: Added `/marker` command - similar to webchat, it creates a stream marker. (#2360)
|
||||
- Minor: Added `/chatters` command showing chatter count. (#2344)
|
||||
- Minor: Added a button to the split context menu to open the moderation view for a channel when the account selected has moderator permissions. (#2321)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "util/Twitch.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
|
@ -633,6 +634,16 @@ void CommandController::initialize(Settings &, Paths &paths)
|
|||
|
||||
return "";
|
||||
});
|
||||
|
||||
this->registerCommand("/clearmessages", [](const auto & /*words*/,
|
||||
ChannelPtr channel) {
|
||||
auto *currentPage = dynamic_cast<SplitContainer *>(
|
||||
getApp()->windows->getMainWindow().getNotebook().getSelectedPage());
|
||||
|
||||
currentPage->getSelectedSplit()->getChannelView().clearMessages();
|
||||
|
||||
return "";
|
||||
});
|
||||
}
|
||||
|
||||
void CommandController::save()
|
||||
|
|
Loading…
Reference in a new issue