Replace QuestionDialog with InfoDialog

Signed-off-by: Bastian <matrix@noxware.de>
pull/21833/head
Bastian 2019-02-06 19:43:55 +01:00
parent d77f10e085
commit aa0ae88076
1 changed files with 6 additions and 9 deletions

View File

@ -404,13 +404,12 @@ export const CommandMap = {
ignoredUsers.push(userId); // de-duped internally in the js-sdk ignoredUsers.push(userId); // de-duped internally in the js-sdk
return success( return success(
cli.setIgnoredUsers(ignoredUsers).then(() => { cli.setIgnoredUsers(ignoredUsers).then(() => {
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog'); const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
Modal.createTrackedDialog('Slash Commands', 'User ignored', QuestionDialog, { Modal.createTrackedDialog('Slash Commands', 'User ignored', InfoDialog, {
title: _t('Ignored user'), title: _t('Ignored user'),
description: <div> description: <div>
<p>{ _t('You are now ignoring %(userId)s', {userId}) }</p> <p>{ _t('You are now ignoring %(userId)s', {userId}) }</p>
</div>, </div>,
hasCancelButton: false,
}); });
}), }),
); );
@ -436,13 +435,12 @@ export const CommandMap = {
if (index !== -1) ignoredUsers.splice(index, 1); if (index !== -1) ignoredUsers.splice(index, 1);
return success( return success(
cli.setIgnoredUsers(ignoredUsers).then(() => { cli.setIgnoredUsers(ignoredUsers).then(() => {
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog'); const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
Modal.createTrackedDialog('Slash Commands', 'User unignored', QuestionDialog, { Modal.createTrackedDialog('Slash Commands', 'User unignored', InfoDialog, {
title: _t('Unignored user'), title: _t('Unignored user'),
description: <div> description: <div>
<p>{ _t('You are no longer ignoring %(userId)s', {userId}) }</p> <p>{ _t('You are no longer ignoring %(userId)s', {userId}) }</p>
</div>, </div>,
hasCancelButton: false,
}); });
}), }),
); );
@ -559,8 +557,8 @@ export const CommandMap = {
return cli.setDeviceVerified(userId, deviceId, true); return cli.setDeviceVerified(userId, deviceId, true);
}).then(() => { }).then(() => {
// Tell the user we verified everything // Tell the user we verified everything
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog'); const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
Modal.createTrackedDialog('Slash Commands', 'Verified key', QuestionDialog, { Modal.createTrackedDialog('Slash Commands', 'Verified key', InfoDialog, {
title: _t('Verified key'), title: _t('Verified key'),
description: <div> description: <div>
<p> <p>
@ -571,7 +569,6 @@ export const CommandMap = {
} }
</p> </p>
</div>, </div>,
hasCancelButton: false,
}); });
}), }),
); );