Use the SettingsStore to get the theme

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2017-11-13 13:14:29 -07:00
parent 7570ce580f
commit 977599a660
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ limitations under the License.
var React = require('react'); var React = require('react');
import { _t } from 'matrix-react-sdk/lib/languageHandler'; import { _t } from 'matrix-react-sdk/lib/languageHandler';
import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; import SettingsStore from 'matrix-react-sdk/lib/settings/SettingsStore';
module.exports = React.createClass({ module.exports = React.createClass({
displayName: 'VectorLoginFooter', displayName: 'VectorLoginFooter',
@ -28,7 +28,7 @@ module.exports = React.createClass({
render: function() { render: function() {
// FIXME: replace this with a proper Status skin // FIXME: replace this with a proper Status skin
if (UserSettingsStore.getTheme() === 'status') return <div/>; if (SettingsStore.getValue("theme") === 'status') return <div/>;
return ( return (
<div className="mx_Login_links"> <div className="mx_Login_links">

View File

@ -252,7 +252,7 @@ async function loadApp() {
if (!preventRedirect) { if (!preventRedirect) {
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
// FIXME: ugly status hardcoding // FIXME: ugly status hardcoding
if (UserSettingsStore.getTheme() === 'status') { if (SettingsStore.getValue("theme") === 'status') {
window.location = "https://status.im/join-riot.html"; window.location = "https://status.im/join-riot.html";
return; return;
} }
@ -265,7 +265,7 @@ async function loadApp() {
} }
else if (/Android/.test(navigator.userAgent)) { else if (/Android/.test(navigator.userAgent)) {
// FIXME: ugly status hardcoding // FIXME: ugly status hardcoding
if (UserSettingsStore.getTheme() === 'status') { if (SettingsStore.getValue("theme") === 'status') {
window.location = "https://status.im/join-riot.html"; window.location = "https://status.im/join-riot.html";
return; return;
} }