Store channel room ID as a string instead of an int

This commit is contained in:
Rasmus Karlsson 2017-07-02 15:12:00 +02:00
parent 3e91340788
commit 5245cfacd1
3 changed files with 6 additions and 7 deletions

View file

@ -64,11 +64,6 @@ const QString &Channel::getName() const
return _name;
}
int Channel::getRoomID() const
{
return _roomID;
}
const QString &Channel::getSubLink() const
{
return _subLink;

View file

@ -37,7 +37,6 @@ public:
bool isEmpty() const;
const QString &getName() const;
int getRoomID() const;
const QString &getSubLink() const;
const QString &getChannelLink() const;
const QString &getPopoutPlayerLink() const;
@ -53,6 +52,8 @@ public:
void sendMessage(const QString &message);
std::string roomID;
private:
WindowManager &windowManager;
EmoteManager &emoteManager;
@ -62,7 +63,6 @@ private:
messages::LimitedQueue<messages::SharedMessage> _messages;
QString _name;
int _roomID;
ConcurrentMap<QString, messages::LazyLoadedImage *> _bttvChannelEmotes;
ConcurrentMap<QString, messages::LazyLoadedImage *> _ffzChannelEmotes;

View file

@ -50,6 +50,10 @@ SharedMessage TwitchMessageBuilder::parse(const Communi::IrcPrivateMessage *ircM
std::string roomID;
if (iterator != std::end(tags)) {
roomID = iterator.value().toString().toStdString();
if (channel->roomID.empty()) {
channel->roomID = roomID;
}
}
// timestamps