mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
22 lines
532 B
TypeScript
22 lines
532 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import {createChildLogger} from '@electron/common/Logger';
|
|
import {app} from 'electron';
|
|
|
|
const logger = createChildLogger('RecentDocuments');
|
|
|
|
export function recordRecentDeepLink(url: string): void {
|
|
if (process.platform !== 'win32' && process.platform !== 'darwin') return;
|
|
try {
|
|
app.addRecentDocument(url);
|
|
} catch (error) {
|
|
logger.debug('addRecentDocument failed', {error});
|
|
}
|
|
}
|
|
|
|
function _clearRecentDeepLinks(): void {
|
|
try {
|
|
app.clearRecentDocuments();
|
|
} catch {}
|
|
}
|