mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fix: resolve /live channel liveness using their channel ID (#5172)
This commit is contained in:
parent
4a5d4ef3fa
commit
3cdb7bf4f6
3 changed files with 6 additions and 4 deletions
|
@ -52,6 +52,7 @@
|
|||
- Bugfix: Fixed double-click text selection moving its position with each new message. (#4898)
|
||||
- Bugfix: Fixed an issue where notifications on Windows would contain no or an old avatar. (#4899)
|
||||
- Bugfix: Fixed headers of tables in the settings switching to bold text when selected. (#4913)
|
||||
- Bugfix: Fixed an issue in the `/live` split that caused some channels to not get grayed-out when they went offline. (#5172)
|
||||
- Bugfix: Fixed tooltips appearing too large and/or away from the cursor. (#4920)
|
||||
- Bugfix: Fixed a crash when clicking `More messages below` button in a usercard and closing it quickly. (#4933)
|
||||
- Bugfix: Fixed thread popup window missing messages for nested threads. (#4923)
|
||||
|
|
|
@ -227,7 +227,8 @@ void NotificationController::removeFakeChannel(const QString channelName)
|
|||
{
|
||||
const auto &s = snapshot[i];
|
||||
|
||||
if (s->messageText == liveMessageSearchText)
|
||||
if (QString::compare(s->messageText, liveMessageSearchText,
|
||||
Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
s->flags.set(MessageFlag::Disabled);
|
||||
break;
|
||||
|
|
|
@ -164,12 +164,14 @@ TwitchChannel::TwitchChannel(const QString &name)
|
|||
MessageBuilder builder;
|
||||
TwitchMessageBuilder::liveSystemMessage(this->getDisplayName(),
|
||||
&builder);
|
||||
builder.message().id = this->roomId();
|
||||
this->addMessage(builder.release());
|
||||
|
||||
// Message in /live channel
|
||||
MessageBuilder builder2;
|
||||
TwitchMessageBuilder::liveMessage(this->getDisplayName(),
|
||||
&builder2);
|
||||
builder2.message().id = this->roomId();
|
||||
getApp()->twitch->liveChannel->addMessage(builder2.release());
|
||||
|
||||
// Notify on all channels with a ping sound
|
||||
|
@ -197,14 +199,12 @@ TwitchChannel::TwitchChannel(const QString &name)
|
|||
|
||||
// MSVC hates this code if the parens are not there
|
||||
int end = (std::max)(0, snapshotLength - 200);
|
||||
auto liveMessageSearchText =
|
||||
QString("%1 is live!").arg(this->getDisplayName());
|
||||
|
||||
for (int i = snapshotLength - 1; i >= end; --i)
|
||||
{
|
||||
const auto &s = snapshot[i];
|
||||
|
||||
if (s->messageText == liveMessageSearchText)
|
||||
if (s->id == this->roomId())
|
||||
{
|
||||
s->flags.set(MessageFlag::Disabled);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue