mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Show feedback upon opening a channel in streamlink in more places (#3510)
Co-authored-by: Leon Richardt <leon.richardt@gmail.com>
This commit is contained in:
parent
52da0fd4b9
commit
9069dee4fb
|
@ -47,6 +47,7 @@
|
||||||
- Minor: Add workaround for multipart emoji as described in [the RFC](https://mm2pl.github.io/emoji_rfc.pdf). (#3469)
|
- Minor: Add workaround for multipart emoji as described in [the RFC](https://mm2pl.github.io/emoji_rfc.pdf). (#3469)
|
||||||
- Minor: Add feedback when using the whisper command `/w` incorrectly. (#3439)
|
- Minor: Add feedback when using the whisper command `/w` incorrectly. (#3439)
|
||||||
- Minor: Add feedback when writing a non-command message in the `/whispers` split. (#3439)
|
- Minor: Add feedback when writing a non-command message in the `/whispers` split. (#3439)
|
||||||
|
- Minor: Opening streamlink through hotkeys and/or split header menu matches `/streamlink` command and shows feedback in chat as well. (#3510)
|
||||||
- Bugfix: Fix Split Input hotkeys not being available when input is hidden (#3362)
|
- Bugfix: Fix Split Input hotkeys not being available when input is hidden (#3362)
|
||||||
- Bugfix: Fixed colored usernames sometimes not working. (#3170)
|
- Bugfix: Fixed colored usernames sometimes not working. (#3170)
|
||||||
- Bugfix: Restored ability to send duplicate `/me` messages. (#3166)
|
- Bugfix: Restored ability to send duplicate `/me` messages. (#3166)
|
||||||
|
|
|
@ -670,8 +670,6 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||||
}
|
}
|
||||||
|
|
||||||
stripChannelName(target);
|
stripChannelName(target);
|
||||||
channel->addMessage(makeSystemMessage(
|
|
||||||
QString("Opening %1 in streamlink...").arg(target)));
|
|
||||||
openStreamlinkForChannel(target);
|
openStreamlinkForChannel(target);
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
#include "util/StreamLink.hpp"
|
#include "util/StreamLink.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "providers/irc/IrcMessageBuilder.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/Helpers.hpp"
|
#include "util/Helpers.hpp"
|
||||||
#include "util/SplitCommand.hpp"
|
#include "util/SplitCommand.hpp"
|
||||||
|
#include "widgets/Window.hpp"
|
||||||
#include "widgets/dialogs/QualityPopup.hpp"
|
#include "widgets/dialogs/QualityPopup.hpp"
|
||||||
|
#include "widgets/splits/Split.hpp"
|
||||||
|
|
||||||
#include <QErrorMessage>
|
#include <QErrorMessage>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -205,6 +209,20 @@ void openStreamlink(const QString &channelURL, const QString &quality,
|
||||||
|
|
||||||
void openStreamlinkForChannel(const QString &channel)
|
void openStreamlinkForChannel(const QString &channel)
|
||||||
{
|
{
|
||||||
|
static const QString INFO_TEMPLATE("Opening %1 in Streamlink ...");
|
||||||
|
|
||||||
|
auto *currentPage = dynamic_cast<SplitContainer *>(
|
||||||
|
getApp()->windows->getMainWindow().getNotebook().getSelectedPage());
|
||||||
|
if (currentPage != nullptr)
|
||||||
|
{
|
||||||
|
if (auto currentSplit = currentPage->getSelectedSplit();
|
||||||
|
currentSplit != nullptr)
|
||||||
|
{
|
||||||
|
currentSplit->getChannel()->addMessage(
|
||||||
|
makeSystemMessage(INFO_TEMPLATE.arg(channel)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString channelURL = "twitch.tv/" + channel;
|
QString channelURL = "twitch.tv/" + channel;
|
||||||
|
|
||||||
QString preferredQuality = getSettings()->preferredQuality.getValue();
|
QString preferredQuality = getSettings()->preferredQuality.getValue();
|
||||||
|
|
Loading…
Reference in a new issue