mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-23 05:17:02 -04:00
Make aftersave void
This commit is contained in:
parent
7c95d3a729
commit
ebfaf54263
3 changed files with 18 additions and 4 deletions
|
@ -10,7 +10,7 @@ import { DataStore } from "@api/index";
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { React } from "@webpack/common";
|
||||
import { Alerts, React } from "@webpack/common";
|
||||
|
||||
import { SoundOverrideComponent } from "./components/SoundOverrideComponent";
|
||||
import { makeEmptyOverride, SoundOverride, soundTypes } from "./types";
|
||||
|
@ -81,6 +81,19 @@ export default definePlugin({
|
|||
settings,
|
||||
findOverride,
|
||||
isOverriden,
|
||||
afterSave() {
|
||||
Alerts.show({
|
||||
title: "Restart required",
|
||||
body: (
|
||||
<>
|
||||
<p>CustomSounds requires a restart for settings to activate.</p>
|
||||
</>
|
||||
),
|
||||
confirmText: "Restart now",
|
||||
cancelText: "Later!",
|
||||
onConfirm: () => location.reload()
|
||||
});
|
||||
},
|
||||
async start() {
|
||||
overrides = await DataStore.get(OVERRIDES_KEY) ?? {};
|
||||
for (const type of soundTypes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue