1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00

Mobile: Plugins: Add command to hide the plugin panel viewer (#12018)

This commit is contained in:
Henry Heino
2025-03-28 05:40:36 -07:00
committed by GitHub
parent 98fe57e87a
commit 1fed875140
5 changed files with 23 additions and 7 deletions

View File

@ -12,8 +12,8 @@ import PluginUserWebView from './PluginUserWebView';
import { View, StyleSheet, AccessibilityInfo } from 'react-native';
import { _ } from '@joplin/lib/locale';
import Setting from '@joplin/lib/models/Setting';
import { Dispatch } from 'redux';
import DismissibleDialog, { DialogSize } from '../../../components/DismissibleDialog';
import CommandService from '@joplin/lib/services/CommandService';
interface Props {
themeId: number;
@ -21,7 +21,6 @@ interface Props {
pluginHtmlContents: PluginHtmlContents;
pluginStates: PluginStates;
visible: boolean;
dispatch: Dispatch;
}
@ -157,11 +156,8 @@ const PluginPanelViewer: React.FC<Props> = props => {
};
const onClose = useCallback(() => {
props.dispatch({
type: 'SET_PLUGIN_PANELS_DIALOG_VISIBLE',
visible: false,
});
}, [props.dispatch]);
void CommandService.instance().execute('dismissPluginPanels');
}, []);
return (
<Portal>