feat: /clearmessages command (#2485)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user