diff --git a/src/components/views/directory/NetworkDropdown.js b/src/components/views/directory/NetworkDropdown.js index c891ee5b..9c19cdbc 100644 --- a/src/components/views/directory/NetworkDropdown.js +++ b/src/components/views/directory/NetworkDropdown.js @@ -150,7 +150,21 @@ export default class NetworkDropdown extends React.Component { if (this.props.protocols) { for (const proto of Object.keys(this.props.protocols)) { if (!this.props.protocols[proto].instances) continue; - for (const instance of this.props.protocols[proto].instances) { + + const sortedInstances = this.props.protocols[proto].instances; + sortedInstances.sort(function(x, y) { + const a = x.desc + const b = y.desc + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + }); + + for (const instance of sortedInstances) { if (!instance.instance_id) continue; options.push(this._makeMenuOption(server, instance, false)); } diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index e70a5d3b..bdb9d17f 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -150,8 +150,16 @@ module.exports = React.createClass({ var eventMeta; if(showEventMeta) { + // Figure out the sender, defaulting to mxid + let sender = this.props.mxEvent.getSender(); + const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); + if (room) { + const member = room.getMember(sender); + if (member) sender = member.name; + } + eventMeta = (
- { _t('Uploaded on %(date)s by %(user)s', {date: DateUtils.formatDate(new Date(this.props.mxEvent.getTs())), user: this.props.mxEvent.getSender()}) } + { _t('Uploaded on %(date)s by %(user)s', {date: DateUtils.formatDate(new Date(this.props.mxEvent.getTs())), user: sender}) }
); } diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index a58b5d58..6e497d62 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -116,6 +116,11 @@ module.exports = React.createClass({ UserSettingsStore.setEnableNotifications(event.target.checked); }, + onEnableDesktopNotificationBodyChange: function(event) { + UserSettingsStore.setEnableNotificationBody(event.target.checked); + this.forceUpdate(); + }, + onEnableEmailNotificationsChange: function(address, event) { var emailPusherPromise; if (event.target.checked) { @@ -831,6 +836,21 @@ module.exports = React.createClass({ +
+
+ +
+
+ +
+
+