From d4cbc86113c12f9e6964fb202ccfb30ec3bafa57 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Mon, 15 Dec 2025 11:22:00 +0000 Subject: [PATCH] Swap order of avatar links If the conditional CSS rules failed to match for some reason, we should prefer the general avatar image rather than the "my" avatar one. That way the fallback mode will still look correct. --- app/helpers/avatars_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb index a30f20962..503430c9a 100644 --- a/app/helpers/avatars_helper.rb +++ b/app/helpers/avatars_helper.rb @@ -44,8 +44,8 @@ module AvatarsHelper def avatar_image_tag(user, **options) tag.span data: { creator_id: user.id } do safe_join [ - image_tag(user_avatar_url(user, script_name: user.account.slug), aria: { hidden: "true" }, size: 48, title: user.name, data: { only_visible_to_others: true }, **options), - image_tag(my_avatar_url(script_name: user.account.slug), aria: { hidden: "true" }, size: 48, title: user.name, data: { only_visible_to_you: true }, **options) + image_tag(my_avatar_url(script_name: user.account.slug), aria: { hidden: "true" }, size: 48, title: user.name, data: { only_visible_to_you: true }, **options), + image_tag(user_avatar_url(user, script_name: user.account.slug), aria: { hidden: "true" }, size: 48, title: user.name, data: { only_visible_to_others: true }, **options) ] end end