mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 12:45:11 +08:00
Unused variables & redundant stuff
This commit is contained in:
parent
56530d80d7
commit
fe369858b7
@ -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
|
||||
|
@ -18,7 +18,6 @@ limitations under the License.
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var q = require('q');
|
||||
|
||||
module.exports = {
|
||||
DialogContainerId: "mx_Dialog_Container",
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -26,7 +26,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
var self = this;
|
||||
return {
|
||||
title: "Error",
|
||||
description: "An error has occurred.",
|
||||
|
@ -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');
|
||||
|
@ -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();
|
||||
|
@ -26,7 +26,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
var self = this;
|
||||
return {
|
||||
title: "",
|
||||
description: "",
|
||||
|
@ -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(
|
||||
|
@ -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 = {
|
||||
|
@ -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");
|
||||
|
@ -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 = {
|
||||
|
@ -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();
|
||||
},
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user