You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Use the SettingsStore in the UnknownDeviceDialog
This commit is contained in:
@@ -20,6 +20,7 @@ import MatrixClientPeg from '../../../MatrixClientPeg';
|
|||||||
import GeminiScrollbar from 'react-gemini-scrollbar';
|
import GeminiScrollbar from 'react-gemini-scrollbar';
|
||||||
import Resend from '../../../Resend';
|
import Resend from '../../../Resend';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
|
||||||
function DeviceListEntry(props) {
|
function DeviceListEntry(props) {
|
||||||
const {userId, device} = props;
|
const {userId, device} = props;
|
||||||
@@ -147,15 +148,8 @@ export default React.createClass({
|
|||||||
return <Spinner />;
|
return <Spinner />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The global value is treated as a default for when rooms don't specify a value.
|
|
||||||
const client = MatrixClientPeg.get();
|
|
||||||
let blacklistUnverified = client.getGlobalBlacklistUnverifiedDevices();
|
|
||||||
if (this.props.room.getBlacklistUnverifiedDevices() !== null) {
|
|
||||||
blacklistUnverified = this.props.room.getBlacklistUnverifiedDevices();
|
|
||||||
}
|
|
||||||
|
|
||||||
let warning;
|
let warning;
|
||||||
if (blacklistUnverified) {
|
if (SettingsStore.getValue("blacklistUnverifiedDevices", this.props.room.roomId)) {
|
||||||
warning = (
|
warning = (
|
||||||
<h4>
|
<h4>
|
||||||
{ _t("You are currently blacklisting unverified devices; to send " +
|
{ _t("You are currently blacklisting unverified devices; to send " +
|
||||||
|
|||||||
Reference in New Issue
Block a user