moved anonymous namespace into chatterino namespace

This commit is contained in:
TranRed 2019-09-08 12:05:41 +02:00
parent 23c2fa8ee5
commit d3c4d4b8cf

View file

@ -28,6 +28,8 @@
#define TEXT_VIEWS "Views: "
#define TEXT_CREATED "Created: "
namespace chatterino {
namespace {
const auto borderColor = QColor(255, 255, 255, 80);
@ -40,24 +42,22 @@ int calculateTimeoutDuration(TimeoutButton timeout)
return timeout.second * durations[timeout.first];
}
chatterino::ChannelPtr filterMessages(const QString &userName,
chatterino::ChannelPtr channel)
ChannelPtr filterMessages(const QString &userName, ChannelPtr channel)
{
chatterino::LimitedQueueSnapshot<chatterino::MessagePtr> snapshot =
LimitedQueueSnapshot<MessagePtr> snapshot =
channel->getMessageSnapshot();
chatterino::ChannelPtr channelPtr(new chatterino::Channel(
channel->getName(), chatterino::Channel::Type::None));
ChannelPtr channelPtr(
new Channel(channel->getName(), Channel::Type::None));
for (size_t i = 0; i < snapshot.size(); i++)
{
chatterino::MessagePtr message = snapshot[i];
MessagePtr message = snapshot[i];
bool isSelectedUser =
message->loginName.compare(userName, Qt::CaseInsensitive) == 0;
if (isSelectedUser &&
!message->flags.has(chatterino::MessageFlag::Whisper))
if (isSelectedUser && !message->flags.has(MessageFlag::Whisper))
{
channelPtr->addMessage(message);
}
@ -68,8 +68,6 @@ chatterino::ChannelPtr filterMessages(const QString &userName,
} // namespace
namespace chatterino {
UserInfoPopup::UserInfoPopup()
: BaseWindow(nullptr, BaseWindow::Flags(BaseWindow::Frameless |
BaseWindow::FramelessDraggable))