Enable plugins/themes on download.
This commit is contained in:
parent
fe3018ce37
commit
902b869137
2 changed files with 11 additions and 1 deletions
|
@ -14,7 +14,9 @@ contextBridge.exposeInMainWorld("download", async (link, plugin) => {
|
||||||
cwd: pluginsPath,
|
cwd: pluginsPath,
|
||||||
})
|
})
|
||||||
|
|
||||||
return { reloadMessage: "Please reload discord with Ctrl+R" }
|
return {
|
||||||
|
reloadMessage: "Please reload discord with Ctrl+R.",
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return { error }
|
return { error }
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,14 @@ export default new (class PluginDownloader {
|
||||||
isPluginChannel
|
isPluginChannel
|
||||||
)
|
)
|
||||||
|
|
||||||
|
isPluginChannel
|
||||||
|
? powercord.pluginManager.enablePlugin(
|
||||||
|
gitURL[7]
|
||||||
|
)
|
||||||
|
: powercord.styleManager.enableTheme(
|
||||||
|
gitURL[7]
|
||||||
|
)
|
||||||
|
|
||||||
if (reloadMessage) {
|
if (reloadMessage) {
|
||||||
Toasts.showToast(
|
Toasts.showToast(
|
||||||
Toasts.createToast(
|
Toasts.createToast(
|
||||||
|
|
Reference in a new issue