Unused variables & redundant stuff

This commit is contained in:
David Baker 2015-09-25 15:17:46 +01:00
parent 56530d80d7
commit fe369858b7
15 changed files with 0 additions and 42 deletions

View File

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
var MatrixClientPeg = require('./MatrixClientPeg');
module.exports = { module.exports = {
/** /**
* Given a room object, return the canonical alias for it * Given a room object, return the canonical alias for it

View File

@ -18,7 +18,6 @@ limitations under the License.
'use strict'; 'use strict';
var React = require('react'); var React = require('react');
var q = require('q');
module.exports = { module.exports = {
DialogContainerId: "mx_Dialog_Container", DialogContainerId: "mx_Dialog_Container",

View File

@ -17,8 +17,6 @@ limitations under the License.
var React = require('react'); var React = require('react');
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var dis = require("../../dispatcher");
module.exports = { module.exports = {
propTypes: { propTypes: {
onFinished: React.PropTypes.func, onFinished: React.PropTypes.func,

View File

@ -19,8 +19,6 @@ limitations under the License.
var React = require('react'); var React = require('react');
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var dis = require("../../dispatcher");
module.exports = { module.exports = {
propTypes: { propTypes: {
onFinished: React.PropTypes.func, onFinished: React.PropTypes.func,

View File

@ -34,11 +34,8 @@ var Loader = require("react-loader");
module.exports = { module.exports = {
componentDidMount: function() { componentDidMount: function() {
var self = this;
// work out the current state // work out the current state
if (this.props.member) { if (this.props.member) {
var usr = MatrixClientPeg.get().getUser(this.props.member.userId) || {};
var memberState = this._calculateOpsPermissions(); var memberState = this._calculateOpsPermissions();
this.setState(memberState); this.setState(memberState);
} }
@ -48,7 +45,6 @@ module.exports = {
var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
var roomId = this.props.member.roomId; var roomId = this.props.member.roomId;
var target = this.props.member.userId; var target = this.props.member.userId;
var self = this;
MatrixClientPeg.get().kick(roomId, target).done(function() { MatrixClientPeg.get().kick(roomId, target).done(function() {
// NO-OP; rely on the m.room.member event coming down else we could // NO-OP; rely on the m.room.member event coming down else we could
// get out of sync if we force setState here! // get out of sync if we force setState here!
@ -66,7 +62,6 @@ module.exports = {
var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
var roomId = this.props.member.roomId; var roomId = this.props.member.roomId;
var target = this.props.member.userId; var target = this.props.member.userId;
var self = this;
MatrixClientPeg.get().ban(roomId, target).done(function() { MatrixClientPeg.get().ban(roomId, target).done(function() {
// NO-OP; rely on the m.room.member event coming down else we could // NO-OP; rely on the m.room.member event coming down else we could
// get out of sync if we force setState here! // get out of sync if we force setState here!
@ -84,7 +79,6 @@ module.exports = {
var ErrorDialog = sdk.getComponent("organisms.ErrorDialog"); var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
var roomId = this.props.member.roomId; var roomId = this.props.member.roomId;
var target = this.props.member.userId; var target = this.props.member.userId;
var self = this;
var room = MatrixClientPeg.get().getRoom(roomId); var room = MatrixClientPeg.get().getRoom(roomId);
if (!room) { if (!room) {
this.props.onFinished(); this.props.onFinished();

View File

@ -26,7 +26,6 @@ module.exports = {
}, },
getDefaultProps: function() { getDefaultProps: function() {
var self = this;
return { return {
title: "Error", title: "Error",
description: "An error has occurred.", description: "An error has occurred.",

View File

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
var React = require("react");
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var Modal = require("../../Modal"); var Modal = require("../../Modal");
var sdk = require('../../index'); var sdk = require('../../index');

View File

@ -52,7 +52,6 @@ module.exports = {
setEnabled: function(enable, callback) { setEnabled: function(enable, callback) {
if(enable) { if(enable) {
if (!this.havePermission()) { if (!this.havePermission()) {
var self = this;
global.Notification.requestPermission(function() { global.Notification.requestPermission(function() {
if (callback) { if (callback) {
callback(); callback();

View File

@ -26,7 +26,6 @@ module.exports = {
}, },
getDefaultProps: function() { getDefaultProps: function() {
var self = this;
return { return {
title: "", title: "",
description: "", description: "",

View File

@ -346,9 +346,6 @@ module.exports = {
{ {
continuation = true; continuation = true;
} }
var ts0 = this.state.room.timeline[i - 1].getTs();
var ts1 = this.state.room.timeline[i].getTs();
} }
if (!TileType) continue; if (!TileType) continue;
ret.unshift( ret.unshift(

View File

@ -15,9 +15,7 @@ limitations under the License.
*/ */
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var React = require("react");
var q = require('q'); var q = require('q');
var dis = require("../../dispatcher");
var version = require('../../../package.json').version; var version = require('../../../package.json').version;
module.exports = { module.exports = {

View File

@ -14,11 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
'use strict';
// should be atomised
var Loader = require("react-loader");
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var RoomListSorter = require("../../RoomListSorter"); var RoomListSorter = require("../../RoomListSorter");
var Presence = require("../../Presence"); var Presence = require("../../Presence");

View File

@ -16,10 +16,7 @@ limitations under the License.
'use strict'; 'use strict';
var React = require('react');
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var Matrix = require("matrix-js-sdk");
var dis = require("../../dispatcher"); var dis = require("../../dispatcher");
module.exports = { module.exports = {

View File

@ -14,12 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
'use strict';
var React = require('react');
var MatrixClientPeg = require("../../MatrixClientPeg"); var MatrixClientPeg = require("../../MatrixClientPeg");
var Matrix = require("matrix-js-sdk");
var dis = require("../../dispatcher"); var dis = require("../../dispatcher");
module.exports = { module.exports = {
@ -194,9 +189,7 @@ module.exports = {
hs_url: this.getHsUrl(), hs_url: this.getHsUrl(),
is_url: this.getIsUrl() is_url: this.getIsUrl()
}); });
var cli = MatrixClientPeg.get();
this.setState({busy: true}); this.setState({busy: true});
var self = this;
this.tryRegister(); this.tryRegister();
}, },

View File

@ -14,14 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
'use strict';
var extend = require('./extend');
function matrixLinkify(linkify) { function matrixLinkify(linkify) {
// Text tokens // Text tokens
var TT = linkify.scanner.TOKENS; var TT = linkify.scanner.TOKENS;
var TextToken = TT.Base;
// Multi tokens // Multi tokens
var MT = linkify.parser.TOKENS; var MT = linkify.parser.TOKENS;
var MultiToken = MT.Base; var MultiToken = MT.Base;