mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Move TwitchEmoteOccurrence to TwitchCommon.hpp
This commit is contained in:
parent
b7a3215e90
commit
8ec40f9293
3 changed files with 25 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
||||||
#include "common/Aliases.hpp"
|
#include "common/Aliases.hpp"
|
||||||
#include "common/Outcome.hpp"
|
#include "common/Outcome.hpp"
|
||||||
#include "messages/SharedMessageBuilder.hpp"
|
#include "messages/SharedMessageBuilder.hpp"
|
||||||
#include "providers/twitch/TwitchMessageBuilder.hpp" // TODO: REMOVE
|
#include "providers/twitch/TwitchCommon.hpp"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
@ -38,6 +38,11 @@ class EventSubMessageBuilder : MessageBuilder
|
||||||
public:
|
public:
|
||||||
EventSubMessageBuilder() = delete;
|
EventSubMessageBuilder() = delete;
|
||||||
|
|
||||||
|
EventSubMessageBuilder(const EventSubMessageBuilder &) = delete;
|
||||||
|
EventSubMessageBuilder &operator=(const EventSubMessageBuilder &) = delete;
|
||||||
|
|
||||||
|
EventSubMessageBuilder(EventSubMessageBuilder &&) = delete;
|
||||||
|
EventSubMessageBuilder &operator=(EventSubMessageBuilder &&) = delete;
|
||||||
/**
|
/**
|
||||||
* NOTE: The builder MUST NOT survive longer than the payload
|
* NOTE: The builder MUST NOT survive longer than the payload
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/Aliases.hpp"
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -7,6 +9,9 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
struct Emote;
|
||||||
|
using EmotePtr = std::shared_ptr<const Emote>;
|
||||||
|
|
||||||
#ifndef ATTR_UNUSED
|
#ifndef ATTR_UNUSED
|
||||||
# ifdef Q_OS_WIN
|
# ifdef Q_OS_WIN
|
||||||
# define ATTR_UNUSED
|
# define ATTR_UNUSED
|
||||||
|
@ -81,4 +86,17 @@ static const QStringList TWITCH_DEFAULT_COMMANDS{
|
||||||
|
|
||||||
static const QStringList TWITCH_WHISPER_COMMANDS{"/w", ".w"};
|
static const QStringList TWITCH_WHISPER_COMMANDS{"/w", ".w"};
|
||||||
|
|
||||||
|
struct TwitchEmoteOccurrence {
|
||||||
|
int start;
|
||||||
|
int end;
|
||||||
|
EmotePtr ptr;
|
||||||
|
EmoteName name;
|
||||||
|
|
||||||
|
bool operator==(const TwitchEmoteOccurrence &other) const
|
||||||
|
{
|
||||||
|
return std::tie(this->start, this->end, this->ptr, this->name) ==
|
||||||
|
std::tie(other.start, other.end, other.ptr, other.name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "common/Aliases.hpp"
|
#include "common/Aliases.hpp"
|
||||||
#include "common/Outcome.hpp"
|
#include "common/Outcome.hpp"
|
||||||
#include "messages/SharedMessageBuilder.hpp"
|
#include "messages/SharedMessageBuilder.hpp"
|
||||||
|
#include "providers/twitch/TwitchCommon.hpp"
|
||||||
#include "pubsubmessages/LowTrustUsers.hpp"
|
#include "pubsubmessages/LowTrustUsers.hpp"
|
||||||
|
|
||||||
#include <IrcMessage>
|
#include <IrcMessage>
|
||||||
|
@ -26,19 +27,6 @@ using HelixModerator = HelixVip;
|
||||||
struct ChannelPointReward;
|
struct ChannelPointReward;
|
||||||
struct DeleteAction;
|
struct DeleteAction;
|
||||||
|
|
||||||
struct TwitchEmoteOccurrence {
|
|
||||||
int start;
|
|
||||||
int end;
|
|
||||||
EmotePtr ptr;
|
|
||||||
EmoteName name;
|
|
||||||
|
|
||||||
bool operator==(const TwitchEmoteOccurrence &other) const
|
|
||||||
{
|
|
||||||
return std::tie(this->start, this->end, this->ptr, this->name) ==
|
|
||||||
std::tie(other.start, other.end, other.ptr, other.name);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class TwitchMessageBuilder : public SharedMessageBuilder
|
class TwitchMessageBuilder : public SharedMessageBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue