From d1e78a735aad04cc6a39f8c8fb88d82e6fa7288e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 29 Oct 2020 10:18:05 +0100 Subject: [PATCH] show error in label for now --- src/domain/session/room/timeline/tiles/ImageTile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/domain/session/room/timeline/tiles/ImageTile.js b/src/domain/session/room/timeline/tiles/ImageTile.js index e86902d9..6c67d3d8 100644 --- a/src/domain/session/room/timeline/tiles/ImageTile.js +++ b/src/domain/session/room/timeline/tiles/ImageTile.js @@ -1,5 +1,6 @@ /* Copyright 2020 Bruno Windels +Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -49,6 +50,7 @@ export class ImageTile extends MessageTile { } } catch (err) { this._error = err; + this.emitChange("label"); } } @@ -95,6 +97,9 @@ export class ImageTile extends MessageTile { } get label() { + if (this._error) { + return `Could not decrypt image: ${this._error.message}`; + } return this._getContent().body; }