Skip to content

Commit f57dae1

Browse files
authored
Merge branch 'master' into refactor/move-pluginmeta
2 parents c5b4d04 + d03e103 commit f57dae1

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- Minor: Added Markdown support to user notes. (#6490)
2727
- Minor: Moderators and VIPs in shared chats now show their channel badges. (#6653)
2828
- Minor: Added message read/update methods to the `Channel` plugin API. (#6650)
29+
- Minor: Added action to reset `/watching`. (#6759)
2930
- Bugfix: Moderation checks now include the lead moderator badge. (#6642)
3031
- Bugfix: Fixed lead moderator badges not being filtered by the `Channel` badge setting. (#6665)
3132
- Bugfix: Expose the "Extra extension IDs" setting on non-Windows systems too. (#6509)

src/controllers/commands/builtin/chatterino/Debugging.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,19 @@ QString debugTest(const CommandContext &ctx)
224224
break;
225225
}
226226
}
227+
else if (command == "set-watching")
228+
{
229+
if (ctx.words.size() < 3)
230+
{
231+
ctx.channel->addSystemMessage("Missing name");
232+
return {};
233+
}
234+
auto chan = getApp()->getTwitch()->getOrAddChannel(ctx.words.at(2));
235+
if (chan != getApp()->getTwitch()->getWatchingChannel().get())
236+
{
237+
getApp()->getTwitch()->setWatchingChannel(chan);
238+
}
239+
}
227240
else
228241
{
229242
ctx.channel->addSystemMessage(

src/widgets/splits/SplitHeader.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,22 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
486486
})
487487
->setVisible(twitchChannel->isLive());
488488

489+
if (this->split_->getIndirectChannel().getType() ==
490+
Channel::Type::TwitchWatching)
491+
{
492+
menu->addAction("Reset /watching", this->split_, [] {
493+
if (!getApp()
494+
->getTwitch()
495+
->getWatchingChannel()
496+
.get()
497+
->isEmpty())
498+
{
499+
getApp()->getTwitch()->setWatchingChannel(
500+
Channel::getEmpty());
501+
}
502+
});
503+
}
504+
489505
menu->addSeparator();
490506
}
491507

0 commit comments

Comments
 (0)