Skip to content

Commit

Permalink
Merge pull request n-air-app#399 from koizuka/fix/preserve-audio-sour…
Browse files Browse the repository at this point in the history
…ces-on-installing-preset

修正: 初回プリセット設定時にデフォルト音声ソースが消えないようにする
  • Loading branch information
koizuka authored Nov 27, 2019
2 parents 46cf91d + d3e5a31 commit c816a65
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/services/scene-collections/scene-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export class SceneCollectionsService extends Service
// this.load() を参考に

this.startLoadingOperation();
await this.deloadCurrentApplicationState();

const jsonData = this.stateService.readCollectionFile(ScenePresetId);
// Preset file作成上の注意
Expand All @@ -152,7 +151,6 @@ export class SceneCollectionsService extends Service
await root.load();
this.hotkeysService.bindHotkeys();

this.collectionLoaded = true;
await this.save();

this.finishLoadingOperation();
Expand All @@ -178,6 +176,7 @@ export class SceneCollectionsService extends Service
async deinitialize() {
this.disableAutoSave();
await this.save();
this.tcpServerService.stopRequestsHandling();
await this.deloadCurrentApplicationState();
await this.stateService.flushManifestFile();
}
Expand Down Expand Up @@ -317,7 +316,7 @@ export class SceneCollectionsService extends Service
name: string,
progressCallback?: (info: IDownloadProgress) => void
) {
this.startLoadingOperation();
this.startLoadingOperation(); // memo: calling this in loadOverlay() too

const pathName = await this.overlaysPersistenceService.downloadOverlay(
url,
Expand Down Expand Up @@ -520,8 +519,6 @@ export class SceneCollectionsService extends Service
private async deloadCurrentApplicationState() {
if (!this.initialized) return;

this.tcpServerService.stopRequestsHandling();

this.collectionWillSwitch.next();

this.disableAutoSave();
Expand Down Expand Up @@ -554,6 +551,7 @@ export class SceneCollectionsService extends Service
*/
private startLoadingOperation() {
this.appService.startLoading();
this.tcpServerService.stopRequestsHandling();
this.disableAutoSave();
}

Expand Down

0 comments on commit c816a65

Please sign in to comment.