mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 00:55:16 -07:00
feat: add auto update support
This commit is contained in:
@@ -31,6 +31,7 @@ export type ReloadConfigRuntimeDeps = {
|
||||
force: boolean;
|
||||
allowSetupPrompt?: boolean;
|
||||
}) => Promise<unknown>;
|
||||
shouldRefreshAnilistClientSecretState?: () => boolean;
|
||||
failHandlers: {
|
||||
logError: (details: string) => void;
|
||||
showErrorBox: (title: string, details: string) => void;
|
||||
@@ -75,7 +76,9 @@ export function createReloadConfigHandler(deps: ReloadConfigRuntimeDeps): () =>
|
||||
}
|
||||
|
||||
deps.startConfigHotReload();
|
||||
void deps.refreshAnilistClientSecretState({ force: true, allowSetupPrompt: false });
|
||||
if (deps.shouldRefreshAnilistClientSecretState?.() !== false) {
|
||||
void deps.refreshAnilistClientSecretState({ force: true, allowSetupPrompt: false });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user