mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Added functionality of colored splits when live
This commit is contained in:
parent
b671fc4133
commit
15e9e3e642
3 changed files with 15 additions and 2 deletions
|
@ -26,6 +26,7 @@ enum class MessageFlag : uint16_t {
|
||||||
Untimeout = (1 << 9),
|
Untimeout = (1 << 9),
|
||||||
PubSub = (1 << 10),
|
PubSub = (1 << 10),
|
||||||
Subscription = (1 << 11),
|
Subscription = (1 << 11),
|
||||||
|
Notification = (1 << 12),
|
||||||
};
|
};
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ TwitchChannel::TwitchChannel(const QString &name)
|
||||||
// this->refreshChannelEmotes();
|
// this->refreshChannelEmotes();
|
||||||
// this->refreshViewerList();
|
// this->refreshViewerList();
|
||||||
|
|
||||||
|
this->tabHighlightRequested.connect([](HighlightState state) {});
|
||||||
|
|
||||||
this->managedConnect(getApp()->accounts->twitch.currentUserChanged,
|
this->managedConnect(getApp()->accounts->twitch.currentUserChanged,
|
||||||
[=] { this->setMod(false); });
|
[=] { this->setMod(false); });
|
||||||
|
|
||||||
|
@ -326,9 +328,10 @@ void TwitchChannel::setLive(bool newLiveStatus)
|
||||||
QApplication::alert(
|
QApplication::alert(
|
||||||
getApp()->windows->getMainWindow().window(), 2500);
|
getApp()->windows->getMainWindow().window(), 2500);
|
||||||
}
|
}
|
||||||
this->tabHighlightRequested.invoke(
|
|
||||||
HighlightState::Notification);
|
|
||||||
}
|
}
|
||||||
|
auto live = makeSystemMessage(this->getName() + " is live");
|
||||||
|
this->addMessage(live);
|
||||||
|
this->tabHighlightRequested.invoke(HighlightState::Notification);
|
||||||
guard->live = newLiveStatus;
|
guard->live = newLiveStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "messages/LimitedQueueSnapshot.hpp"
|
#include "messages/LimitedQueueSnapshot.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
#include "messages/layouts/MessageLayout.hpp"
|
#include "messages/layouts/MessageLayout.hpp"
|
||||||
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchServer.hpp"
|
#include "providers/twitch/TwitchServer.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
|
@ -552,6 +553,14 @@ void ChannelView::setChannel(ChannelPtr newChannel)
|
||||||
|
|
||||||
this->layoutMessages();
|
this->layoutMessages();
|
||||||
this->queueUpdate();
|
this->queueUpdate();
|
||||||
|
|
||||||
|
// Notifications
|
||||||
|
TwitchChannel *tc = dynamic_cast<TwitchChannel *>(newChannel.get());
|
||||||
|
if (tc != nullptr) {
|
||||||
|
tc->tabHighlightRequested.connect([this](HighlightState state) {
|
||||||
|
this->tabHighlightRequested.invoke(HighlightState::Notification);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelView::detachChannel()
|
void ChannelView::detachChannel()
|
||||||
|
|
Loading…
Reference in a new issue