mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 02:22:01 +00:00
Migrate most of frontend callServerMethod usage over to websocket
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { ConfirmModal } from 'decky-frontend-lib';
|
||||
import { FC } from 'react';
|
||||
|
||||
import { uninstallPlugin } from '../../plugin';
|
||||
|
||||
interface PluginUninstallModalProps {
|
||||
name: string;
|
||||
title: string;
|
||||
@@ -14,7 +16,7 @@ const PluginUninstallModal: FC<PluginUninstallModalProps> = ({ name, title, butt
|
||||
<ConfirmModal
|
||||
closeModal={closeModal}
|
||||
onOK={async () => {
|
||||
await window.DeckyPluginLoader.callServerMethod('uninstall_plugin', { name });
|
||||
await uninstallPlugin(name);
|
||||
// uninstalling a plugin resets the hidden setting for it server-side
|
||||
// we invalidate here so if you re-install it, you won't have an out-of-date hidden filter
|
||||
await window.DeckyPluginLoader.hiddenPluginsService.invalidate();
|
||||
|
||||
Reference in New Issue
Block a user