mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
61 lines
1.2 KiB
C++
61 lines
1.2 KiB
C++
#include "channel.hpp"
|
|
#include "emotemanager.hpp"
|
|
#include "ircmanager.hpp"
|
|
#include "logging/loggingmanager.hpp"
|
|
#include "messages/message.hpp"
|
|
#include "windowmanager.hpp"
|
|
|
|
#include <QDebug>
|
|
#include <QJsonArray>
|
|
#include <QJsonDocument>
|
|
#include <QJsonObject>
|
|
#include <QJsonValue>
|
|
#include <QNetworkAccessManager>
|
|
#include <QNetworkReply>
|
|
#include <QNetworkRequest>
|
|
|
|
using namespace chatterino::messages;
|
|
|
|
namespace chatterino {
|
|
|
|
Channel::Channel()
|
|
// , loggingChannel(logging::get(name))
|
|
{
|
|
}
|
|
|
|
bool Channel::isEmpty() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
messages::LimitedQueueSnapshot<messages::SharedMessage> Channel::getMessageSnapshot()
|
|
{
|
|
return this->messages.getSnapshot();
|
|
}
|
|
|
|
void Channel::addMessage(std::shared_ptr<Message> message)
|
|
{
|
|
std::shared_ptr<Message> deleted;
|
|
|
|
// if (_loggingChannel.get() != nullptr) {
|
|
// _loggingChannel->append(message);
|
|
// }
|
|
|
|
if (this->messages.appendItem(message, deleted)) {
|
|
messageRemovedFromStart(deleted);
|
|
}
|
|
|
|
this->messageAppended(message);
|
|
}
|
|
|
|
bool Channel::canSendMessage() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void Channel::sendMessage(const QString &message)
|
|
{
|
|
}
|
|
|
|
} // namespace chatterino
|