mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature-274] improve oculus downloading process
This commit is contained in:
@@ -56,7 +56,7 @@ export class BsDownloaderService {
|
||||
|
||||
public async downloadVersion(version: BSVersion, from: BsStore): Promise<BSVersion | void> {
|
||||
|
||||
if(from === BsStore.STEAM){
|
||||
if(from === BsStore.STEAM || !version.OculusBinaryId){
|
||||
return this.steamDownloader.downloadBsVersion(version);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,17 +66,15 @@ export class OculusDownloaderService {
|
||||
return (async () => {
|
||||
|
||||
const autoDownload = await lastValueFrom(this.tryAutoDownload(version)).then(() => true).catch(() => false);
|
||||
|
||||
console.log("LAAAA");
|
||||
|
||||
if(autoDownload){
|
||||
return autoDownload;
|
||||
}
|
||||
|
||||
const [confirm, stay] = await this.modals.openModal(LoginToMetaModal).then(res => [res.exitCode === ModalExitCode.COMPLETED, res.data]);
|
||||
const [completed, stay] = await this.modals.openModal(LoginToMetaModal).then(res => [res.exitCode === ModalExitCode.COMPLETED, res.data]);
|
||||
|
||||
if(!confirm){
|
||||
return confirm;
|
||||
if(!completed){
|
||||
return completed;
|
||||
}
|
||||
|
||||
return lastValueFrom(this.doDownloadBsVersion({ version, stay })).then(() => true);
|
||||
|
||||
Reference in New Issue
Block a user