un c# the plugins (remove newlines before brackets)

This commit is contained in:
Sam 2024-07-23 10:29:00 +01:00
parent a74268fb36
commit 94eae6548e
4 changed files with 9 additions and 19 deletions

View file

@ -19,8 +19,7 @@ import constants from "../constants";
const { getMutualFriendsCount, getMutualGuilds } = findByPropsLazy("getMutualFriendsCount", "getMutualFriends");
const { removeRelationship } = findByPropsLazy("removeFriend", "unblockUser");
function UserInfoComponent(props)
{
function UserInfoComponent(props) {
const { user } = props;
const userPicture = user.getAvatarURL();
@ -45,8 +44,7 @@ function UserInfoComponent(props)
);
}
export function FriendPruneModal(props)
{
export function FriendPruneModal(props) {
const friends = RelationshipStore.getFriendIDs().map(e => UserStore.getUser(e));

View file

@ -16,8 +16,7 @@ import { InfoWithIcon } from "./InfoWithIcon";
const { leaveGuild } = findByPropsLazy("deleteGuild", "leaveGuild");
function ServerInfoComponent(props)
{
function ServerInfoComponent(props) {
const { server, messages, recentMessages } = props;
const serverIcon = server?.getIconSource("256", true)?.uri;
@ -36,9 +35,7 @@ function ServerInfoComponent(props)
);
}
export function GuildPruneModal(props)
{
export function GuildPruneModal(props) {
const joinedServers = Object.values(GuildStore.getGuilds()).filter(e => !e.isOwner(UserStore.getCurrentUser()));
const [index, setIndex] = useState(0);
@ -47,8 +44,7 @@ export function GuildPruneModal(props)
const [recentMessages, setRecentMessages] = useState("");
const [waited, setWaited] = useState(false);
function ProcessNext(shouldLeave)
{
function ProcessNext(shouldLeave) {
if(shouldLeave)
{
leaveGuild(joinedServers[index].id);
@ -66,8 +62,7 @@ export function GuildPruneModal(props)
}
}
useEffect(() =>
{
useEffect(() => {
const timer = setTimeout(() =>
{
setWaited(true);
@ -76,8 +71,7 @@ export function GuildPruneModal(props)
}, [index]);
useAwaiter(async () =>
{
useAwaiter(async () => {
const response = await RestAPI.get(
{
url: `/guilds/${joinedServers[index].id}/messages/search?author_id=${UserStore.getCurrentUser().id}`

View file

@ -8,8 +8,7 @@ import { Text } from "@webpack/common";
import { cl } from "../index";
export function InfoWithIcon(props)
{
export function InfoWithIcon(props) {
const { svg, children } = props;
return (
<div className={cl("infowithicon")}>

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
const constants =
{
const constants = {
book: "M249.6 471.5c10.8 3.8 22.4-4.1 22.4-15.5V78.6c0-4.2-1.6-8.4-5-11C247.4 52 202.4 32 144 32C93.5 32 46.3 45.3 18.1 56.1C6.8 60.5 0 71.7 0 83.8v370.3c0 11.9 12.8 20.2 24.1 16.5C55.6 460.1 105.5 448 144 448c33.9 0 79 14 105.6 23.5m76.8 0C353 462 398.1 448 432 448c38.5 0 88.4 12.1 119.9 22.6c11.3 3.8 24.1-4.6 24.1-16.5V83.8c0-12.1-6.8-23.3-18.1-27.6C529.7 45.3 482.5 32 432 32c-58.4 0-103.4 20-123 35.6c-3.3 2.6-5 6.8-5 11V456c0 11.4 11.7 19.3 22.4 15.5",
clock: "M256 0a256 256 0 1 1 0 512a256 256 0 1 1 0-512m-24 120v136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24",
pastClock: "M75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24h110.1c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75m181 53c-13.3 0-24 10.7-24 24v104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65V152c0-13.3-10.7-24-24-24z",