Fix 7TV zero-width emotes not working (#292)
Use flags to determine 7TV zero width emote
This commit is contained in:
parent
bc67aad670
commit
1cb04bed2d
2 changed files with 4 additions and 1 deletions
|
|
@ -109,10 +109,12 @@ class EmoteFFZ {
|
|||
class Emote7TV {
|
||||
final String id;
|
||||
final String name;
|
||||
final int flags;
|
||||
final Emote7TVData data;
|
||||
|
||||
const Emote7TV(
|
||||
this.id,
|
||||
this.flags,
|
||||
this.name,
|
||||
this.data,
|
||||
);
|
||||
|
|
@ -231,7 +233,7 @@ class Emote {
|
|||
realName: emote.name != emote.data.name ? emote.data.name : null,
|
||||
width: emote.data.host.files.first.width,
|
||||
height: emote.data.host.files.first.height,
|
||||
zeroWidth: emote.data.tags?.contains('zerowidth') ?? false,
|
||||
zeroWidth: emote.flags == 1,
|
||||
url: 'https:$url/${file.name}',
|
||||
type: type,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ EmoteFFZ _$EmoteFFZFromJson(Map<String, dynamic> json) => EmoteFFZ(
|
|||
|
||||
Emote7TV _$Emote7TVFromJson(Map<String, dynamic> json) => Emote7TV(
|
||||
json['id'] as String,
|
||||
json['flags'] as int,
|
||||
json['name'] as String,
|
||||
Emote7TVData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue