added select channel dialog

This commit is contained in:
fourtf
2018-04-18 09:12:29 +02:00
parent 043823120f
commit 3446a623f5
29 changed files with 1295 additions and 69 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ void AbstractIrcServer::onDisconnected()
std::lock_guard<std::mutex> lock(this->channelMutex);
MessagePtr msg = Message::createSystemMessage("disconnected from chat");
msg->flags &= Message::DisconnectedMessage;
msg->flags |= Message::DisconnectedMessage;
for (std::weak_ptr<Channel> &weak : this->channels.values()) {
std::shared_ptr<Channel> chan = weak.lock();
+1 -1
View File
@@ -20,7 +20,7 @@ namespace providers {
namespace twitch {
TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection *_readConnection)
: Channel(channelName)
: Channel(channelName, Channel::Twitch)
, bttvChannelEmotes(new util::EmoteMap)
, ffzChannelEmotes(new util::EmoteMap)
, subscriptionURL("https://www.twitch.tv/subs/" + name)
@@ -68,9 +68,13 @@ MessagePtr TwitchMessageBuilder::build()
// PARSING
this->parseUsername();
// this->message->setCollapsedDefault(true);
// this->appendWord(Word(Resources::getInstance().badgeCollapsed, Word::Collapsed, QString(),
// QString()));
#ifdef XD
if (this->originalMessage.length() > 100) {
this->message->flags |= Message::Collapsed;
this->emplace<EmoteElement>(singletons::ResourceManager::getInstance().badgeCollapsed,
MessageElement::Collapsed);
}
#endif
// PARSING
this->parseMessageID();
@@ -440,7 +444,7 @@ void TwitchMessageBuilder::parseHighlights()
}
if (doHighlight) {
this->message->flags &= Message::Highlighted;
this->message->flags |= Message::Highlighted;
}
}
}
+3 -2
View File
@@ -17,8 +17,9 @@ namespace providers {
namespace twitch {
TwitchServer::TwitchServer()
: whispersChannel(new Channel("/whispers"))
, mentionsChannel(new Channel("/mentions"))
: whispersChannel(new Channel("/whispers", Channel::TwitchWhispers))
, mentionsChannel(new Channel("/mentions", Channel::TwitchMentions))
, watchingChannel(new Channel("/watching", Channel::TwitchWatching))
{
AccountManager::getInstance().Twitch.userChanged.connect([this]() { //
util::postToThread([this] { this->connect(); });
+1
View File
@@ -22,6 +22,7 @@ public:
const ChannelPtr whispersChannel;
const ChannelPtr mentionsChannel;
const ChannelPtr watchingChannel;
protected:
void initializeConnection(Communi::IrcConnection *connection, bool isRead,