changed notation

This commit is contained in:
fourtf
2017-01-18 04:33:30 +01:00
parent 552e4c957a
commit 10e4a0f785
61 changed files with 1214 additions and 1051 deletions
+16 -16
View File
@@ -5,35 +5,35 @@
#include <memory>
Channel::Channel(const QString &channel)
: m_messages()
, m_name((channel.length() > 0 && channel[0] == '#') ? channel.mid(1)
: channel)
, m_bttvChannelEmotes()
, m_ffzChannelEmotes()
, m_messageMutex()
, m_subLink("https://www.twitch.tv/" + m_name +
"/subscribe?ref=in_chat_subscriber_link")
, m_channelLink("https://twitch.tv/" + m_name)
, m_popoutPlayerLink("https://player.twitch.tv/?channel=" + m_name)
: messages()
, name((channel.length() > 0 && channel[0] == '#') ? channel.mid(1)
: channel)
, bttvChannelEmotes()
, ffzChannelEmotes()
, messageMutex()
, subLink("https://www.twitch.tv/" + name +
"/subscribe?ref=in_chat_subscriber_link")
, channelLink("https://twitch.tv/" + name)
, popoutPlayerLink("https://player.twitch.tv/?channel=" + name)
{
}
QVector<std::shared_ptr<Message>>
Channel::getMessagesClone()
{
m_messageMutex.lock();
QVector<std::shared_ptr<Message>> M(m_messages);
this->messageMutex.lock();
QVector<std::shared_ptr<Message>> M(this->messages);
M.detach();
m_messageMutex.unlock();
this->messageMutex.unlock();
return M;
}
void
Channel::addMessage(std::shared_ptr<Message> message)
{
m_messageMutex.lock();
m_messages.append(message);
m_messageMutex.unlock();
this->messageMutex.lock();
this->messages.append(message);
this->messageMutex.unlock();
Windows::repaintVisibleChatWidgets();
}