diff --git a/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.html b/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.html
index 3f332128..4377e237 100644
--- a/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.html
+++ b/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.html
@@ -1,5 +1,6 @@
diff --git a/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.ts b/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.ts
index f1c1691d..79f598d5 100644
--- a/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.ts
+++ b/frontend/app/gallery/grid/photo/loading/loading.photo.grid.gallery.component.ts
@@ -8,6 +8,7 @@ import {Component, Input} from "@angular/core";
export class GalleryPhotoLoadingComponent {
@Input() animate: boolean;
+ @Input() error: boolean;
}
diff --git a/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html b/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html
index 1851376c..a0c420c6 100644
--- a/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html
+++ b/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html
@@ -2,6 +2,7 @@
diff --git a/frontend/app/gallery/thumnailManager.service.ts b/frontend/app/gallery/thumnailManager.service.ts
index fede073e..8fb1fea4 100644
--- a/frontend/app/gallery/thumnailManager.service.ts
+++ b/frontend/app/gallery/thumnailManager.service.ts
@@ -30,7 +30,7 @@ export abstract class ThumbnailBase {
protected available: boolean = false;
protected src: string = null;
protected loading: boolean = false;
- protected error: boolean = true;
+ protected error: boolean = false;
protected onLoad: Function = null;
protected thumbnailTask: ThumbnailTaskEntity;
@@ -45,18 +45,22 @@ export abstract class ThumbnailBase {
}
- get Available() {
+ get Available(): boolean {
return this.available;
}
- get Src() {
+ get Src(): string {
return this.src;
}
- get Loading() {
+ get Loading(): boolean {
return this.loading;
}
+ get Error(): boolean {
+ return this.error;
+ }
+
destroy() {
if (this.thumbnailTask != null) {
this.thumbnailService.removeTask(this.thumbnailTask);
@@ -96,10 +100,6 @@ export class IconThumbnail extends ThumbnailBase {
this.thumbnailTask = null;
this.loading = false;
this.error = true;
- //TODO: handle error
- //TODO: not an error if its from cache
- console.error("something bad happened");
- console.error(error);
}
};
this.thumbnailTask = this.thumbnailService.loadIcon(this.photo, ThumbnailLoadingPriority.high, listener);
@@ -153,10 +153,8 @@ export class Thumbnail extends ThumbnailBase {
},
onError: (error) => {//onError
this.thumbnailTask = null;
- //TODO: handle error
- //TODO: not an error if its from cache
- console.error("something bad happened");
- console.error(error);
+ this.loading = false;
+ this.error = true;
}
};
if (this.photo.isReplacementThumbnailAvailable()) {