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.
*/
var MatrixClientPeg = require('./MatrixClientPeg');
module.exports = {
/**
* Given a room object, return the canonical alias for it

View File

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

View File

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

View File

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

View File

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

View File

@ -26,7 +26,6 @@ module.exports = {
},
getDefaultProps: function() {
var self = this;
return {
title: "Error",
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.
*/
var React = require("react");
var MatrixClientPeg = require("../../MatrixClientPeg");
var Modal = require("../../Modal");
var sdk = require('../../index');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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