mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): request avatar and banner sizes the media proxy serves (#1842)
This commit is contained in:
1 parent
c3e747aaa4
commit
bd381ccc74
8 files changed
+181
-563
No files matched your search
@@ -131,13 +131,10 @@ export const InviteAcceptModal = observer(function InviteAcceptModal({code}: Inv
|
||||
if (!guild.id || !guild.splash) {
|
||||
return null;
|
||||
}
|
||||
return AvatarUtils.getGuildSplashURL(
|
||||
{
|
||||
id: guild.id,
|
||||
splash: guild.splash,
|
||||
},
|
||||
4096,
|
||||
);
|
||||
return AvatarUtils.getGuildSplashURL({
|
||||
id: guild.id,
|
||||
splash: guild.splash,
|
||||
});
|
||||
}, [invite]);
|
||||
const isJoinDisabled = isGuildInviteActionDisabled(guildActionState);
|
||||
const primaryActionType = getGuildInvitePrimaryAction(guildActionState);
|
||||
|
||||
@@ -57,7 +57,7 @@ export const InvitePagePreviewModal: React.FC<InvitePagePreviewModalProps> = obs
|
||||
const splashUrl = useMemo(() => {
|
||||
if (previewSplashUrl) return previewSplashUrl;
|
||||
if (guild?.splash) {
|
||||
return AvatarUtils.getGuildSplashURL({id: guild.id, splash: guild.splash}, 4096);
|
||||
return AvatarUtils.getGuildSplashURL({id: guild.id, splash: guild.splash});
|
||||
}
|
||||
return null;
|
||||
}, [previewSplashUrl, guild?.id, guild?.splash]);
|
||||
|
||||
@@ -170,7 +170,7 @@ const InviteLoginPageContainer = observer(() => {
|
||||
}
|
||||
const guild = guildInvite.guild;
|
||||
if (guild?.splash && guild.id) {
|
||||
const splashUrl = getGuildSplashURL({id: guild.id, splash: guild.splash}, 4096) ?? null;
|
||||
const splashUrl = getGuildSplashURL({id: guild.id, splash: guild.splash}) ?? null;
|
||||
setSplashUrl(splashUrl);
|
||||
}
|
||||
}, [guildInvite?.guild?.splash, guildInvite?.guild?.id, setSplashUrl]);
|
||||
|
||||
@@ -66,13 +66,10 @@ const InviteRegisterPage = observer(function InviteRegisterPage() {
|
||||
}
|
||||
const guild = guildInvite.guild;
|
||||
if (guild?.splash) {
|
||||
const splashUrl = AvatarUtils.getGuildSplashURL(
|
||||
{
|
||||
id: guild.id,
|
||||
splash: guild.splash,
|
||||
},
|
||||
4096,
|
||||
);
|
||||
const splashUrl = AvatarUtils.getGuildSplashURL({
|
||||
id: guild.id,
|
||||
splash: guild.splash,
|
||||
});
|
||||
setSplashUrl(splashUrl);
|
||||
}
|
||||
}, [guildInvite?.guild?.splash, guildInvite?.guild?.id, setSplashUrl]);
|
||||
|
||||
Reference in new issue
Block a user