Skip to content

Commit

Permalink
fix: use host for emoji mute (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon authored Dec 12, 2024
1 parent df71b3c commit f0d966f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/view/widget/custom_emoji.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ class CustomEmoji extends ConsumerWidget {
final style = DefaultTextStyle.of(context).style;
final fallbackTextStyle = this.fallbackTextStyle ?? style;
final height = this.height ?? style.lineHeight;
final muted = ref
.watch(mutedEmojisNotifierProvider(account))
.contains(emoji.replaceFirst('@.', ''));
final muted = ref.watch(
mutedEmojisNotifierProvider(account).select((emojis) {
final emoji = this.emoji.replaceFirst('@.', '');
if (!emoji.contains('@') && host != null) {
return emojis
.contains('${emoji.substring(0, emoji.length - 1)}@$host:');
} else {
return emojis.contains(emoji);
}
}),
);
if (muted) {
return InkWell(
onTap: onTap,
Expand Down

0 comments on commit f0d966f

Please sign in to comment.