From 7f6d9a625d101cd74fdfc610e22d1d36aab66485 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 10 Apr 2017 17:40:09 +0100 Subject: [PATCH 1/2] Make the clear cache button work on desktop Implement reload in Platforms to support https://github.com/matrix-org/matrix-react-sdk/pull/798 Fixes https://github.com/vector-im/riot-web/issues/3597 --- src/vector/platform/ElectronPlatform.js | 4 ++++ src/vector/platform/WebPlatform.js | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index c10f2f83c0..6e55b454cd 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -139,4 +139,8 @@ export default class ElectronPlatform extends VectorBasePlatform { requestNotificationPermission() : Promise { return q('granted'); } + + reload() { + electron.remote.getCurrentWebContents().reload(); + } } diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index bf4175132e..5dc5505297 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -206,4 +206,10 @@ export default class WebPlatform extends VectorBasePlatform { } return null; } + + reload() { + // forceReload=false since we don't really need new HTML/JS files + // we just need to restart the JS runtime. + window.location.reload(false); + } } From b26c460f1355a8d981f6f0f9f1360a8cb4d83cd4 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 10 Apr 2017 23:22:25 +0100 Subject: [PATCH 2/2] shrink the redacted tear --- .../vector/css/matrix-react-sdk/views/rooms/_EventTile.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss index b59ac0b9dc..4f01aeeee7 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss @@ -133,9 +133,10 @@ limitations under the License. .mx_EventTile_redacted .mx_EventTile_line .mx_UnknownBody { display: block; width: 100%; - height: 73px; + height: 36px; background-image: $event-redacted-img; background-repeat: no-repeat; + background-size: contain; } .mx_EventTile.mx_EventTile_redacted .mx_EventTile_line {