From 3903954bf22290ac133e7972d71752ab67d21504 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 2 Feb 2017 19:35:36 +0000 Subject: [PATCH] Allow mxc: URLs for icons in the NetworkDropdown For https://github.com/vector-im/riot-web/issues/3086 --- src/components/views/directory/NetworkDropdown.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/directory/NetworkDropdown.js b/src/components/views/directory/NetworkDropdown.js index 4ce094bc3..c891ee5b2 100644 --- a/src/components/views/directory/NetworkDropdown.js +++ b/src/components/views/directory/NetworkDropdown.js @@ -181,7 +181,10 @@ export default class NetworkDropdown extends React.Component { span_class = 'mx_NetworkDropdown_menu_network'; } else { key = server + '_inst_' + instance.instance_id; - icon = ; + const imgUrl = instance.icon ? + MatrixClientPeg.get().mxcUrlToHttp(instance.icon, 25, 25, 'crop', true) : + DEFAULT_ICON_URL; + icon = ; name = instance.desc; span_class = 'mx_NetworkDropdown_menu_network'; }