Fix HolyNotes (#6)

* Fix HN

* Remove Comments on code
This commit is contained in:
Wolfie 2024-06-22 13:44:43 -04:00 committed by GitHub
parent a40ef29b3a
commit 938bc9f34e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View file

@ -144,8 +144,6 @@ export default new (class NoteHandler {
const User = findByCode("tag", "isClyde");
for (const notebook in notebooks)
for (const noteId in notebooks[notebook]) {
const note = notebooks[notebook][noteId];

View file

@ -5,7 +5,7 @@
*/
import { classes } from "@utils/misc";
import { findByProps } from "@webpack";
import { findByCode } from "@webpack";
import { Button, Clickable, Menu, Popout, React } from "@webpack/common";
import { SvgOverFlowIcon } from "../icons/overFlowIcon";
@ -20,8 +20,11 @@ export function NoteBookTabs({ tabs, selectedTabId, onSelectTab }: { tabs: strin
const resizeObserverRef = React.useRef<ResizeObserver | null>(null);
const [show, setShow] = React.useState(false);
const { isNotNullish } = findByProps("isNotNullish");
const { overflowIcon } = findByProps("overflowIcon");
function isNotNullish(value) {
return value !== null && value !== undefined;
}
const { overflowIcon } = findByCode("overflowIcon");
const handleResize = React.useCallback(() => {
if (!tabBarRef.current) return;

View file

@ -6,7 +6,7 @@
import { classes } from "@utils/misc";
import { ModalProps } from "@utils/modal";
import { findByCode, findByProps } from "@webpack";
import { findByCode, findByCodeLazy, findByProps, findComponentByCodeLazy } from "@webpack";
import { Clipboard, ContextMenuApi, FluxDispatcher, Menu, NavigationRouter, React } from "@webpack/common";
import noteHandler from "../../NoteHandler";
@ -26,11 +26,11 @@ export const RenderMessage = ({
fromDeleteModal: boolean;
closeModal?: () => void;
}) => {
const ChannelMessage = findByProps("ThreadStarterChatMessage").default;
const ChannelMessage = findComponentByCodeLazy("Message must not be a thread");
const { message, groupStart, cozyMessage } = findByProps("cozyMessage");
const User = findByCode("isClyde(){");
const Message = findByCode("isEdited(){");
const Channel = findByProps("ChannelRecordBase").ChannelRecordBase;
const Channel = findByCodeLazy("computeLurkerPermissionsAllowList");
const [isHoldingDelete, setHoldingDelete] = React.useState(false);