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,
|
||||
})
|
||||
|
||||
return { reloadMessage: "Please reload discord with Ctrl+R" }
|
||||
return {
|
||||
reloadMessage: "Please reload discord with Ctrl+R.",
|
||||
}
|
||||
} catch (error) {
|
||||
return { error }
|
||||
}
|
||||
|
|
|
@ -60,6 +60,14 @@ export default new (class PluginDownloader {
|
|||
isPluginChannel
|
||||
)
|
||||
|
||||
isPluginChannel
|
||||
? powercord.pluginManager.enablePlugin(
|
||||
gitURL[7]
|
||||
)
|
||||
: powercord.styleManager.enableTheme(
|
||||
gitURL[7]
|
||||
)
|
||||
|
||||
if (reloadMessage) {
|
||||
Toasts.showToast(
|
||||
Toasts.createToast(
|
||||
|
|
Reference in a new issue