mirror of
https://github.com/Equicord/Equicord.git
synced 2025-04-01 13:11:57 -04:00
Move SoundBoardLogger Find
This commit is contained in:
parent
698975da16
commit
aa6141f3a7
2 changed files with 3 additions and 7 deletions
|
@ -9,8 +9,7 @@ import { Flex } from "@components/Flex";
|
|||
import { Margins } from "@utils/margins";
|
||||
import { classes, copyWithToast } from "@utils/misc";
|
||||
import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { LazyComponent } from "@utils/react";
|
||||
import { filters, find } from "@webpack";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { Button, Clickable, Forms, Text, Tooltip, useEffect, UserUtils, useState } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
|
@ -21,10 +20,7 @@ import { LogIcon } from "./Icons";
|
|||
import { openMoreUsersModal } from "./MoreUsersModal";
|
||||
import { openUserModal } from "./UserModal";
|
||||
|
||||
const HeaderBarIcon = LazyComponent(() => {
|
||||
const filter = filters.byCode(".HEADER_BAR_BADGE");
|
||||
return find(m => m.Icon && filter(m.Icon)).Icon;
|
||||
});
|
||||
const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"');
|
||||
|
||||
export async function openSoundBoardLog(): Promise<void> {
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export default definePlugin({
|
|||
predicate: () => settings.store.IconLocation === "toolbar",
|
||||
find: "toolbar:function",
|
||||
replacement: {
|
||||
match: /(function \i\(\i\){)(.{1,200}toolbar.{1,200}mobileToolbar)/,
|
||||
match: /(function \i\(\i\){)(.{1,500}toolbar.{1,500}mobileToolbar)/,
|
||||
replace: "$1$self.addSBIconToToolBar(arguments[0]);$2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue