mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Rename parseUrl -> parseCallbackUrl
This commit is contained in:
parent
90621a8417
commit
2386abea3e
@ -36,7 +36,7 @@ import ShareService from '@joplin/lib/services/share/ShareService';
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
import removeKeylessItems from '../ResizableLayout/utils/removeKeylessItems';
|
||||
import { localSyncInfoFromState } from '@joplin/lib/services/synchronizer/syncInfoUtils';
|
||||
import { parseUrl } from '@joplin/lib/ProtocolUtils';
|
||||
import { parseCallbackUrl } from '@joplin/lib/ProtocolUtils';
|
||||
import ElectronAppWrapper from '../../ElectronAppWrapper';
|
||||
|
||||
const { connect } = require('react-redux');
|
||||
@ -202,7 +202,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
||||
|
||||
private openUrl(url: string) {
|
||||
console.log(`openUrl ${url}`);
|
||||
const { command, params } = parseUrl(url);
|
||||
const { command, params } = parseCallbackUrl(url);
|
||||
void CommandService.instance().execute(command, params.id);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ export interface CallbackUrlInfo {
|
||||
params: Record<string, string>;
|
||||
}
|
||||
|
||||
export function parseUrl(s: string): CallbackUrlInfo {
|
||||
export function parseCallbackUrl(s: string): CallbackUrlInfo {
|
||||
if (!isCallbackUrl(s)) throw new Error(`Invalid callback url ${s}`);
|
||||
const url = new URL(s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user