mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #4643 from vector-im/luke/fix-room-tile-dnd
Use `catch` instead of `fail` to handle room tag error
This commit is contained in:
commit
0c253e2437
@ -130,10 +130,7 @@ var roomTileSource = {
|
|||||||
if (newTag && newTag !== 'im.vector.fake.direct' &&
|
if (newTag && newTag !== 'im.vector.fake.direct' &&
|
||||||
(item.targetList !== item.originalList || newOrder)
|
(item.targetList !== item.originalList || newOrder)
|
||||||
) {
|
) {
|
||||||
//component.state.set({ spinner: component.state.spinner ? component.state.spinner++ : 1 });
|
MatrixClientPeg.get().setRoomTag(item.room.roomId, newTag, newOrder).catch(function(err) {
|
||||||
MatrixClientPeg.get().setRoomTag(item.room.roomId, newTag, newOrder).finally(function() {
|
|
||||||
//component.state.set({ spinner: component.state.spinner-- });
|
|
||||||
}).fail(function(err) {
|
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
console.error("Failed to add tag " + newTag + " to room: " + err);
|
console.error("Failed to add tag " + newTag + " to room: " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
|
Loading…
Reference in New Issue
Block a user