very tiny amount of fixes
This commit is contained in:
parent
81c1be068a
commit
5c9818c63d
6 changed files with 9 additions and 20 deletions
|
|
@ -70,6 +70,7 @@ export function isPluginRequired(p: string) {
|
|||
export function addPatch(newPatch: Omit<Patch, "plugin">, pluginName: string, pluginPath = `Vencord.Plugins.plugins[${JSON.stringify(pluginName)}]`) {
|
||||
// TODO: this causes crashes
|
||||
if (pluginName === "Vesktop" && newPatch.find === ".STREAMING_AUTO_STREAMER_MODE,") return;
|
||||
if (pluginName === "Equibop" && newPatch.find === ".STREAMING_AUTO_STREAMER_MODE,") return;
|
||||
|
||||
const patch = newPatch as Patch;
|
||||
patch.plugin = pluginName;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { Devs, IS_MAC } from "@utils/constants";
|
|||
import { Margins } from "@utils/margins";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Forms, React } from "@webpack/common";
|
||||
import { React } from "@webpack/common";
|
||||
|
||||
import hideBugReport from "./hideBugReport.css?managed";
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import { Logger } from "@utils/Logger";
|
|||
import definePlugin from "@utils/types";
|
||||
import { Channel, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findCssClassesLazy } from "@webpack";
|
||||
import { Avatar, ChannelStore, Clickable, IconUtils, RelationshipStore, ScrollerThin, Text, useMemo, UserStore } from "@webpack/common";
|
||||
import { Avatar, ChannelStore, Clickable, IconUtils, RelationshipStore, ScrollerThin, useMemo, UserStore } from "@webpack/common";
|
||||
import { ComponentType, JSX } from "react";
|
||||
|
||||
const SelectedChannelActionCreators = findByPropsLazy("selectPrivateChannel");
|
||||
|
|
|
|||
|
|
@ -17,10 +17,8 @@
|
|||
*/
|
||||
|
||||
import { useTimer } from "@utils/react";
|
||||
import { ComponentType } from "react";
|
||||
|
||||
|
||||
import { cl } from "..";
|
||||
import { cl, VoiceMessage } from "..";
|
||||
|
||||
const PREVIEW_IDLE_LABEL = "----";
|
||||
const PREVIEW_RECORDING_LABEL = "RECORDING";
|
||||
|
|
@ -29,7 +27,6 @@ export interface VoiceMessageProps {
|
|||
src: string;
|
||||
waveform: string;
|
||||
}
|
||||
export let VoiceMessage: ComponentType<VoiceMessageProps> = () => null;
|
||||
|
||||
export type VoicePreviewOptions = {
|
||||
src?: string;
|
||||
|
|
|
|||
|
|
@ -35,9 +35,10 @@ import definePlugin, { OptionType } from "@utils/types";
|
|||
import { chooseFile } from "@utils/web";
|
||||
import { CloudUploadPlatform } from "@vencord/discord-types/enums";
|
||||
import { Button, CloudUploader, Constants, FluxDispatcher, Forms, lodash, Menu, MessageActions, PendingReplyStore, PermissionsBits, PermissionStore, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common";
|
||||
import { ComponentType } from "react";
|
||||
|
||||
import { VoiceRecorderDesktop } from "./components/DesktopRecorder";
|
||||
import { VoicePreview } from "./components/VoicePreview";
|
||||
import { VoiceMessageProps, VoicePreview } from "./components/VoicePreview";
|
||||
import { VoiceRecorderWeb } from "./components/WebRecorder";
|
||||
|
||||
const VOICE_MESSAGE_FLAG = 1 << 13;
|
||||
|
|
@ -61,6 +62,8 @@ export type VoiceRecorder = React.ComponentType<{
|
|||
onRecordingChange?(recording: boolean): void;
|
||||
}>;
|
||||
|
||||
export let VoiceMessage: ComponentType<VoiceMessageProps> = () => null;
|
||||
|
||||
type AudioMetadata = {
|
||||
waveform: string,
|
||||
duration: number,
|
||||
|
|
|
|||
|
|
@ -157,19 +157,7 @@ Toasts.create = (message: string, type: string, options?: ToastOptions): ToastDa
|
|||
options,
|
||||
});
|
||||
|
||||
Toasts.show = ({ message, type = ToastType.MESSAGE, options }: ToastData) => {
|
||||
const { showNotification } = require("../../api/Notifications");
|
||||
|
||||
showNotification({
|
||||
title: ToastTypeToNotificationTitle[type] ?? "Notice",
|
||||
body: message,
|
||||
color: ToastTypeToNotificationColor[type] ?? "#5865f2",
|
||||
permanent: options?.duration === 0,
|
||||
richBody: options?.component ?? undefined,
|
||||
noPersist: true,
|
||||
dismissOnClick: true,
|
||||
});
|
||||
};
|
||||
Toasts.show = () => { };
|
||||
|
||||
Toasts.pop = () => { };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue