From 085e07c5b1360a14ed9aca5f06e08cf64b7b3a5a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 21 Jul 2015 11:26:08 +0100 Subject: [PATCH] Display error on fail --- skins/base/views/organisms/RoomView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/skins/base/views/organisms/RoomView.js b/skins/base/views/organisms/RoomView.js index df4c157e..124f74cd 100644 --- a/skins/base/views/organisms/RoomView.js +++ b/skins/base/views/organisms/RoomView.js @@ -21,6 +21,7 @@ var React = require('react'); var MatrixClientPeg = require("../../../../src/MatrixClientPeg"); var ComponentBroker = require('../../../../src/ComponentBroker'); +var Modal = require("../../../../src/Modal"); var classNames = require("classnames"); var filesize = require('filesize'); var q = require('q'); @@ -30,6 +31,7 @@ var RoomHeader = ComponentBroker.get('molecules/RoomHeader'); var MessageComposer = ComponentBroker.get('molecules/MessageComposer'); var CallView = ComponentBroker.get("molecules/voip/CallView"); var RoomSettings = ComponentBroker.get("molecules/RoomSettings"); +var ErrorDialog = ComponentBroker.get("organisms/ErrorDialog"); var RoomViewController = require("../../../../src/controllers/organisms/RoomView"); @@ -124,8 +126,10 @@ module.exports = React.createClass({ if (deferreds.length) { var self = this; q.all(deferreds).fail(function(err) { - // TODO: Handle err - console.error(err); + Modal.createDialog(ErrorDialog, { + title: "Failed to set state", + description: err.toString() + }); }).finally(function() { self.setState({ uploadingRoomSettings: false,