mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-08-31 03:07:23 +00:00
refactor: remove unused onDispatch properties
This commit removes the onDispatch callback passed to PluginRunner, as it declares its own. It also removes the function in the page. Lastly, it removes the prop passed to Grid but adds the one passed to List.
This commit is contained in:
parent
66f40dc607
commit
b8f05b2c84
2 changed files with 3 additions and 11 deletions
|
@ -29,9 +29,9 @@
|
|||
<div class="h-full overflow-y-auto">
|
||||
{#if rootNode}
|
||||
{#if rootNode.type === 'List'}
|
||||
<List nodeId={rootNode.id} {uiTree} {onDispatch} {onSelect} {searchText} />
|
||||
<List nodeId={rootNode.id} {uiTree} {onSelect} {searchText} />
|
||||
{:else if rootNode.type === 'Grid'}
|
||||
<Grid nodeId={rootNode.id} {uiTree} {onSelect} {searchText} />
|
||||
<Grid nodeId={rootNode.id} {uiTree} {onDispatch} {onSelect} {searchText} />
|
||||
{:else if rootNode.type === 'Detail'}
|
||||
<Detail nodeId={rootNode.id} {uiTree} {onDispatch} />
|
||||
{:else}
|
||||
|
|
|
@ -198,10 +198,6 @@
|
|||
sidecarService.getPreferences(pluginName);
|
||||
}
|
||||
|
||||
function handleDispatch(instanceId: number, handlerName: string, args: unknown[]) {
|
||||
sidecarService.dispatchEvent('dispatch-event', { instanceId, handlerName, args });
|
||||
}
|
||||
|
||||
function handlePopView() {
|
||||
sidecarService.dispatchEvent('pop-view');
|
||||
}
|
||||
|
@ -257,11 +253,7 @@
|
|||
<Extensions onBack={viewManager.showCommandPalette} onInstall={onExtensionInstalled} />
|
||||
{:else if currentView === 'plugin-running'}
|
||||
{#key uiStore.currentRunningPlugin?.pluginPath}
|
||||
<PluginRunner
|
||||
onDispatch={handleDispatch}
|
||||
onPopView={handlePopView}
|
||||
onToastAction={handleToastAction}
|
||||
/>
|
||||
<PluginRunner onPopView={handlePopView} onToastAction={handleToastAction} />
|
||||
{/key}
|
||||
{:else if currentView === 'clipboard-history'}
|
||||
<ClipboardHistoryView onBack={viewManager.showCommandPalette} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue