Fix crashes & settings on canary
This commit is contained in:
parent
c1593e1806
commit
098124175f
|
@ -182,7 +182,7 @@ export default definePlugin({
|
||||||
patchedSettings: new WeakSet(),
|
patchedSettings: new WeakSet(),
|
||||||
|
|
||||||
addSettings(elements: any[], element: { header?: string; settings: string[]; }, sectionTypes: SectionTypes) {
|
addSettings(elements: any[], element: { header?: string; settings: string[]; }, sectionTypes: SectionTypes) {
|
||||||
if (this.patchedSettings.has(elements) || !this.isRightSpot(element)) return;
|
if (this.patchedSettings.has(elements)) return;
|
||||||
|
|
||||||
this.patchedSettings.add(elements);
|
this.patchedSettings.add(elements);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,18 @@ const subscribedFluxEventsPlugins = new Set<string>();
|
||||||
const pluginsValues = Object.values(Plugins);
|
const pluginsValues = Object.values(Plugins);
|
||||||
const settings = Settings.plugins;
|
const settings = Settings.plugins;
|
||||||
|
|
||||||
|
const forceDisabled = new Set([
|
||||||
|
"MessageLogger",
|
||||||
|
"ShowHiddenChannels",
|
||||||
|
"MoreUserTags",
|
||||||
|
"Decor",
|
||||||
|
"IgnoreActivities",
|
||||||
|
"NoBlockedMessages",
|
||||||
|
"BetterFolders",
|
||||||
|
"NoPendingCount"
|
||||||
|
]);
|
||||||
export function isPluginEnabled(p: string) {
|
export function isPluginEnabled(p: string) {
|
||||||
|
if (forceDisabled.has(p)) return false;
|
||||||
return (
|
return (
|
||||||
Plugins[p]?.required ||
|
Plugins[p]?.required ||
|
||||||
Plugins[p]?.isDependency ||
|
Plugins[p]?.isDependency ||
|
||||||
|
|
Loading…
Reference in a new issue