Skip to content

Commit

Permalink
don't preload images immediately upon turning on setting (this made n…
Browse files Browse the repository at this point in the history
…o sense)
  • Loading branch information
cbartondock committed Jun 12, 2024
1 parent 16f315d commit 4ff3b48
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
6 changes: 0 additions & 6 deletions src/renderer/components/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ export class PreviewComponent implements OnDestroy {
this.previewService.generatePreviewData();
}

preloadImages() {
this.previewService.preloadImages();
}



setImageBoxSizes() {
const currentViewType = this.previewService.getCurrentViewType();
if(isArtworkType(currentViewType)) {
Expand Down
3 changes: 0 additions & 3 deletions src/renderer/components/settings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ export class SettingsComponent implements OnDestroy {
}

preload(value: boolean) {
if (this.settings.previewSettings.preload !== value && value)
this.previewService.preloadImages();

this.settings.previewSettings.preload = value;
}

Expand Down
12 changes: 0 additions & 12 deletions src/renderer/services/preview.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,6 @@ export class PreviewService {
}
}

preloadImages() {
for(const artworkType of artworkTypes) {
for(const imageKey in this.onlineImages[artworkType]) {
for(let provider of onlineProviders) {
for (let i = 0; i < this.onlineImages[artworkType][imageKey].online[provider].content.length; i++) {
this.preloadImage(this.onlineImages[artworkType][imageKey].online[provider].content[i]);
}
}
}
}
}

setImageIndex(app: PreviewDataApp, index: number, artworkType?: ArtworkType, ignoreCurrentType: boolean = false) {
if (app) {
const actualArtworkType = !ignoreCurrentType && isArtworkType(this.currentViewType) ? this.currentViewType : artworkType;
Expand Down

0 comments on commit 4ff3b48

Please sign in to comment.