Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 committed May 11, 2024
1 parent 705bc8d commit f1e7a1e
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions plugins/picture-links/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ async function openModal(src: string, event) {

hideActionSheet(); // hide user sheet
openMediaModal({
initialSources: [{
uri: src,
sourceURI: src,
width,
height,
guildId: getGuildId(),
channelId: getChannelId(),
}],
initialIndex: 0,
originLayout: {
width: 0, // this would ideally be the size of the small pfp but this proved very hard to implement
height: 0,
x: event.pageX,
y: event.pageY,
resizeMode: "fill",
}
initialSources: [{
uri: src,
sourceURI: src,
width,
height,
guildId: getGuildId(),
channelId: getChannelId(),
}],
initialIndex: 0,
originLayout: {
width: 0, // this would ideally be the size of the small pfp but this proved very hard to implement
height: 0,
x: event.pageX,
y: event.pageY,
resizeMode: "fill",
}
});
}

const unpatchAvatar = after("default", HeaderAvatar, ([{ user, style, guildId }], res) => {
const guildSpecific = user.guildMemberAvatars?.[guildId] && `https://cdn.discordapp.com/guilds/${guildId}/users/${user.id}/avatars/${user.guildMemberAvatars[guildId]}.png`;
const guildSpecific = user.guildMemberAvatars?.[guildId] && `https://cdn.discordapp.com/guilds/${guildId}/users/${user.id}/avatars/${user.guildMemberAvatars[guildId]}.png?size=4096`;
const image = user?.getAvatarURL?.(false, 4096, true);
if (!image) return res;

Expand Down Expand Up @@ -81,7 +81,7 @@ const unpatchBanner = after("default", ProfileBanner, ([{ bannerSource }], res)
// if (this.props?.size !== "XLARGE") return;
// const url = this.props?.guild?.getIconURL?.(4096);
// if (!url) return res;

//
// return (
// <Pressable onPress={({ nativeEvent }) => openModal(url, nativeEvent)}>
// {res}
Expand All @@ -92,5 +92,5 @@ const unpatchBanner = after("default", ProfileBanner, ([{ bannerSource }], res)
export function onUnload() {
unpatchAvatar();
unpatchBanner();
// unpatchGuildIcon();
// unpatchGuildIcon();
}

0 comments on commit f1e7a1e

Please sign in to comment.