refactor: merge emote element flags (#6511)
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -175,7 +175,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"name": "Keepo",
|
||||
"tooltip": "Keepo<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -126,7 +126,7 @@
|
||||
"name": "Keepo",
|
||||
"tooltip": "Keepo<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -145,7 +145,7 @@
|
||||
"name": "PogChamp",
|
||||
"tooltip": "PogChamp<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
"name": "BTTVEmote",
|
||||
"tooltip": "BTTVEmote Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -108,7 +108,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -130,7 +130,7 @@
|
||||
"name": "7TVEmote",
|
||||
"tooltip": "7TVEmote Tooltip"
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText"
|
||||
"flags": "EmoteImage|EmoteText"
|
||||
},
|
||||
{
|
||||
"emote": {
|
||||
@@ -145,7 +145,7 @@
|
||||
"tooltip": "7TVEmote0w Tooltip",
|
||||
"zeroWidth": true
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText"
|
||||
"flags": "EmoteImage|EmoteText"
|
||||
},
|
||||
{
|
||||
"emote": {
|
||||
@@ -160,10 +160,10 @@
|
||||
"tooltip": "7TVEmote0w Tooltip",
|
||||
"zeroWidth": true
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText"
|
||||
"flags": "EmoteImage|EmoteText"
|
||||
}
|
||||
],
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -236,7 +236,7 @@
|
||||
"name": "PogChamp",
|
||||
"tooltip": "PogChamp<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -256,7 +256,7 @@
|
||||
"name": "7TVGlobal",
|
||||
"tooltip": "7TVGlobal Tooltip"
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -275,7 +275,7 @@
|
||||
"name": "Keepo",
|
||||
"tooltip": "Keepo<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -294,7 +294,7 @@
|
||||
"name": "FFZEmote",
|
||||
"tooltip": "FFZEmote Tooltip"
|
||||
},
|
||||
"flags": "FfzEmoteImage|FfzEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -313,7 +313,7 @@
|
||||
"name": "FFZGlobal",
|
||||
"tooltip": "FFZGlobal Tooltip"
|
||||
},
|
||||
"flags": "FfzEmoteImage|FfzEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -157,7 +157,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"name": "f",
|
||||
"tooltip": "f<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"name": "fo",
|
||||
"tooltip": "fo<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
"name": "PogChamp",
|
||||
"tooltip": "PogChamp<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -123,7 +123,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -157,7 +157,7 @@
|
||||
"name": "Keepo",
|
||||
"tooltip": "Keepo<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -197,7 +197,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -233,7 +233,7 @@
|
||||
"name": "MyCoolTwitchEmote",
|
||||
"tooltip": "MyCoolTwitchEmote Tooltip"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
"name": "Kreygasm",
|
||||
"tooltip": "Kreygasm<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -148,7 +148,7 @@
|
||||
"name": "Kreygasm",
|
||||
"tooltip": "Kreygasm<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
"name": "BTTVGlobal",
|
||||
"tooltip": "BTTVGlobal Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -123,7 +123,7 @@
|
||||
"name": ":)",
|
||||
"tooltip": ":)<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
"name": "Keepo",
|
||||
"tooltip": "Keepo<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -183,7 +183,7 @@
|
||||
"name": "FFZEmote",
|
||||
"tooltip": "FFZEmote Tooltip"
|
||||
},
|
||||
"flags": "FfzEmoteImage|FfzEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"flags": "TwitchEmoteImage|ChannelPointReward",
|
||||
"flags": "EmoteImage|ChannelPointReward",
|
||||
"image": "https://chatterino.com/reward1x.png",
|
||||
"link": {
|
||||
"type": "None",
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"flags": "TwitchEmoteImage|ChannelPointReward",
|
||||
"flags": "EmoteImage|ChannelPointReward",
|
||||
"image": "https://chatterino.com/reward1x.png",
|
||||
"link": {
|
||||
"type": "None",
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"flags": "TwitchEmoteImage|ChannelPointReward",
|
||||
"flags": "EmoteImage|ChannelPointReward",
|
||||
"image": "https://chatterino.com/reward1x.png",
|
||||
"link": {
|
||||
"type": "None",
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"name": "7TVEmote",
|
||||
"tooltip": "7TVEmote Tooltip"
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -109,7 +109,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -145,7 +145,7 @@
|
||||
"name": "7TVEmote",
|
||||
"tooltip": "7TVEmote Tooltip"
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -141,7 +141,7 @@
|
||||
"name": "BTTVGlobal",
|
||||
"tooltip": "BTTVGlobal Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -176,7 +176,7 @@
|
||||
"name": "7TVGlobal",
|
||||
"tooltip": "7TVGlobal Tooltip"
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -210,7 +210,7 @@
|
||||
"name": "FFZGlobal",
|
||||
"tooltip": "FFZGlobal Tooltip"
|
||||
},
|
||||
"flags": "FfzEmoteImage|FfzEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -229,7 +229,7 @@
|
||||
"name": "BTTVTwitchDev",
|
||||
"tooltip": "BTTVTwitchDev Tooltip"
|
||||
},
|
||||
"flags": "BttvEmoteImage|BttvEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -249,7 +249,7 @@
|
||||
"name": "7TVTwitchDev",
|
||||
"tooltip": "7TVTwitchDev Tooltip"
|
||||
},
|
||||
"flags": "SevenTVEmoteImage|SevenTVEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
@@ -268,7 +268,7 @@
|
||||
"name": "FFZTwitchDev",
|
||||
"tooltip": "FFZTwitchDev Tooltip"
|
||||
},
|
||||
"flags": "FfzEmoteImage|FfzEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
"name": "Kappa",
|
||||
"tooltip": "Kappa<br>Twitch Emote"
|
||||
},
|
||||
"flags": "TwitchEmoteImage|TwitchEmoteText",
|
||||
"flags": "EmoteImage|EmoteText",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"input": [
|
||||
"msg = {elements={",
|
||||
" { type = 'linebreak' },",
|
||||
" { type = 'linebreak', flags = c2.MessageElementFlag.BttvEmoteImage },",
|
||||
" { type = 'linebreak', flags = c2.MessageElementFlag.EmoteImage },",
|
||||
" { type = 'linebreak', tooltip = 't' },",
|
||||
" { type = 'linebreak', trailing_space = false },",
|
||||
"}}"
|
||||
@@ -27,7 +27,7 @@
|
||||
"type": "LinebreakElement"
|
||||
},
|
||||
{
|
||||
"flags": "BttvEmoteImage",
|
||||
"flags": "EmoteImage",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
|
||||
@@ -78,7 +78,7 @@ std::vector<std::shared_ptr<MessageElement>> makeElements(const QString &text)
|
||||
.baseName = {},
|
||||
});
|
||||
elements.emplace_back(std::make_shared<EmoteElement>(
|
||||
emote, MessageElementFlag::TwitchEmote));
|
||||
emote, MessageElementFlag::Emote));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ TEST_P(MessageLayoutContainerTest, RtlReordering)
|
||||
{
|
||||
MessageElementFlag::Text,
|
||||
MessageElementFlag::Username,
|
||||
MessageElementFlag::TwitchEmote,
|
||||
MessageElementFlag::Emote,
|
||||
},
|
||||
.width = 10000,
|
||||
.scale = 1.0F,
|
||||
|
||||
@@ -899,27 +899,21 @@ TEST_F(PluginTest, MessageElementFlag)
|
||||
"BitsAmount=0x200000,"
|
||||
"BitsAnimated=0x1000,"
|
||||
"BitsStatic=0x800,"
|
||||
"BttvEmoteImage=0x40,"
|
||||
"BttvEmoteText=0x80,"
|
||||
"ChannelName=0x100000,"
|
||||
"ChannelPointReward=0x100,"
|
||||
"Collapsed=0x4000000,"
|
||||
"EmojiImage=0x800000,"
|
||||
"EmojiText=0x1000000,"
|
||||
"FfzEmoteImage=0x200,"
|
||||
"FfzEmoteText=0x400,"
|
||||
"EmoteImage=0x10,"
|
||||
"EmoteText=0x20,"
|
||||
"LowercaseLinks=0x20000000,"
|
||||
"Mention=0x8000000,"
|
||||
"Misc=0x1,"
|
||||
"ModeratorTools=0x400000,"
|
||||
"RepliedMessage=0x100000000,"
|
||||
"ReplyButton=0x200000000,"
|
||||
"SevenTVEmoteImage=0x400000000,"
|
||||
"SevenTVEmoteText=0x800000000,"
|
||||
"Text=0x2,"
|
||||
"Timestamp=0x8,"
|
||||
"TwitchEmoteImage=0x10,"
|
||||
"TwitchEmoteText=0x20,"
|
||||
"Username=0x4";
|
||||
|
||||
std::string got = (*lua)["out"];
|
||||
|
||||
Reference in New Issue
Block a user