mirror of https://github.com/vector-im/riot-web
Display error on fail
parent
0e9074b0de
commit
085e07c5b1
|
@ -21,6 +21,7 @@ var React = require('react');
|
||||||
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
var MatrixClientPeg = require("../../../../src/MatrixClientPeg");
|
||||||
|
|
||||||
var ComponentBroker = require('../../../../src/ComponentBroker');
|
var ComponentBroker = require('../../../../src/ComponentBroker');
|
||||||
|
var Modal = require("../../../../src/Modal");
|
||||||
var classNames = require("classnames");
|
var classNames = require("classnames");
|
||||||
var filesize = require('filesize');
|
var filesize = require('filesize');
|
||||||
var q = require('q');
|
var q = require('q');
|
||||||
|
@ -30,6 +31,7 @@ var RoomHeader = ComponentBroker.get('molecules/RoomHeader');
|
||||||
var MessageComposer = ComponentBroker.get('molecules/MessageComposer');
|
var MessageComposer = ComponentBroker.get('molecules/MessageComposer');
|
||||||
var CallView = ComponentBroker.get("molecules/voip/CallView");
|
var CallView = ComponentBroker.get("molecules/voip/CallView");
|
||||||
var RoomSettings = ComponentBroker.get("molecules/RoomSettings");
|
var RoomSettings = ComponentBroker.get("molecules/RoomSettings");
|
||||||
|
var ErrorDialog = ComponentBroker.get("organisms/ErrorDialog");
|
||||||
|
|
||||||
var RoomViewController = require("../../../../src/controllers/organisms/RoomView");
|
var RoomViewController = require("../../../../src/controllers/organisms/RoomView");
|
||||||
|
|
||||||
|
@ -124,8 +126,10 @@ module.exports = React.createClass({
|
||||||
if (deferreds.length) {
|
if (deferreds.length) {
|
||||||
var self = this;
|
var self = this;
|
||||||
q.all(deferreds).fail(function(err) {
|
q.all(deferreds).fail(function(err) {
|
||||||
// TODO: Handle err
|
Modal.createDialog(ErrorDialog, {
|
||||||
console.error(err);
|
title: "Failed to set state",
|
||||||
|
description: err.toString()
|
||||||
|
});
|
||||||
}).finally(function() {
|
}).finally(function() {
|
||||||
self.setState({
|
self.setState({
|
||||||
uploadingRoomSettings: false,
|
uploadingRoomSettings: false,
|
||||||
|
|
Loading…
Reference in New Issue