mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
feat: only require sync if is main wiki
This commit is contained in:
parent
bb88f38f3e
commit
54216db75c
6 changed files with 397 additions and 165 deletions
|
|
@ -229,9 +229,11 @@ export class Git implements IGitService {
|
|||
complete: () => resolve(),
|
||||
});
|
||||
|
||||
public async initWikiGit(wikiFolderPath: string, isSyncedWiki?: boolean, remoteUrl?: string, userInfo?: IGitUserInfos): Promise<void> {
|
||||
public async initWikiGit(wikiFolderPath: string, isSyncedWiki?: boolean, isMainWiki?: boolean, remoteUrl?: string, userInfo?: IGitUserInfos): Promise<void> {
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
const syncImmediately = !!isSyncedWiki && !!isMainWiki;
|
||||
return await new Promise<void>((resolve, reject) => {
|
||||
this.gitWorker?.initWikiGit(wikiFolderPath, isSyncedWiki, remoteUrl, userInfo).subscribe(this.getWorkerObserver(resolve, reject));
|
||||
this.gitWorker?.initWikiGit(wikiFolderPath, syncImmediately, remoteUrl, userInfo).subscribe(this.getWorkerObserver(resolve, reject));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue