Fix rare case where 7TV emotes don't show
7TV emotes are locked to 4x size, but if that doesn't exist an exception is thrown. The lack of 4x size seems to be caused by a new emote still in processing.
This commit is contained in:
parent
1a55bd2e63
commit
364b94411d
1 changed files with 3 additions and 2 deletions
|
|
@ -261,9 +261,10 @@ class Emote {
|
|||
final emoteData = emote.data;
|
||||
|
||||
final url = emoteData!.host.url;
|
||||
|
||||
// Flutter doesn't support AVIF yet.
|
||||
final file = emoteData.host.files.reversed.firstWhere(
|
||||
(file) => file.format != 'AVIF' && file.name.contains('4x'),
|
||||
final file = emoteData.host.files.lastWhere(
|
||||
(file) => file.format != 'AVIF',
|
||||
);
|
||||
|
||||
// Check if the flag has 1 at the 8th bit.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue