mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix rerun flag not being unset after stream finishes (#5237)
This commit is contained in:
parent
9151446c0e
commit
8cea86cf17
|
@ -35,7 +35,7 @@
|
|||
- Minor: Add a new Channel API for experimental plugins feature. (#5141, #5184, #5187)
|
||||
- Minor: Added the ability to change the top-most status of a window regardless of the _Always on top_ setting (right click the notebook). (#5135)
|
||||
- Minor: Introduce `c2.later()` function to Lua API. (#5154)
|
||||
- Minor: Live streams that are marked as reruns now mark a tab as yellow instead of red. (#5176)
|
||||
- Minor: Live streams that are marked as reruns now mark a tab as yellow instead of red. (#5176, #5237)
|
||||
- Minor: Updated to Emoji v15.1. Google emojis are now used as the fallback instead of Twitter emojis. (#5182)
|
||||
- Minor: Allow theming of tab live and rerun indicators. (#5188)
|
||||
- Minor: Added a fallback theme field to custom themes that will be used in case the custom theme does not contain a color Chatterino needs. If no fallback theme is specified, we'll pull the color from the included Dark or Light theme. (#5198)
|
||||
|
|
|
@ -384,6 +384,8 @@ void CommandController::initialize(Settings &, const Paths &paths)
|
|||
|
||||
#ifndef NDEBUG
|
||||
this->registerCommand("/fakemsg", &commands::injectFakeMessage);
|
||||
this->registerCommand("/debug-update-to-no-stream",
|
||||
&commands::injectStreamUpdateNoStream);
|
||||
#endif
|
||||
|
||||
this->registerCommand("/copy", &commands::copyToClipboard);
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace chatterino::commands {
|
||||
|
||||
QString follow(const CommandContext &ctx)
|
||||
|
@ -569,6 +571,27 @@ QString injectFakeMessage(const CommandContext &ctx)
|
|||
return "";
|
||||
}
|
||||
|
||||
QString injectStreamUpdateNoStream(const CommandContext &ctx)
|
||||
{
|
||||
/**
|
||||
* /debug-update-to-no-stream makes the current channel mimic going offline
|
||||
*/
|
||||
if (ctx.channel == nullptr)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if (ctx.twitchChannel == nullptr)
|
||||
{
|
||||
ctx.channel->addMessage(
|
||||
makeSystemMessage("The /debug-update-to-no-stream command only "
|
||||
"works in Twitch channels"));
|
||||
return "";
|
||||
}
|
||||
|
||||
ctx.twitchChannel->updateStreamStatus(std::nullopt);
|
||||
return "";
|
||||
}
|
||||
|
||||
QString copyToClipboard(const CommandContext &ctx)
|
||||
{
|
||||
if (ctx.channel == nullptr)
|
||||
|
|
|
@ -25,6 +25,7 @@ QString clearmessages(const CommandContext &ctx);
|
|||
QString openURL(const CommandContext &ctx);
|
||||
QString sendRawMessage(const CommandContext &ctx);
|
||||
QString injectFakeMessage(const CommandContext &ctx);
|
||||
QString injectStreamUpdateNoStream(const CommandContext &ctx);
|
||||
QString copyToClipboard(const CommandContext &ctx);
|
||||
QString unstableSetUserClientSideColor(const CommandContext &ctx);
|
||||
QString openUsercard(const CommandContext &ctx);
|
||||
|
|
|
@ -1178,6 +1178,11 @@ bool TwitchChannel::setLive(bool newLiveStatus)
|
|||
return false;
|
||||
}
|
||||
guard->live = newLiveStatus;
|
||||
if (!newLiveStatus)
|
||||
{
|
||||
// A rerun is just a fancy livestream
|
||||
guard->rerun = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue