forked from matrix/element-web
be more consistent with naming
This commit is contained in:
parent
acfe05db9d
commit
947f389e51
|
@ -19,14 +19,14 @@ limitations under the License.
|
||||||
// should be atomised
|
// should be atomised
|
||||||
var Loader = require("react-loader");
|
var Loader = require("react-loader");
|
||||||
|
|
||||||
var mxCliPeg = require("../../MatrixClientPeg");
|
var MatrixClientPeg = require("../../MatrixClientPeg");
|
||||||
|
|
||||||
var dis = require("../../dispatcher");
|
var dis = require("../../dispatcher");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
logged_in: !!(mxCliPeg.get() && mxCliPeg.get().credentials),
|
logged_in: !!(MatrixClientPeg.get() && mxCliPeg.get().credentials),
|
||||||
ready: false
|
ready: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -61,8 +61,8 @@ module.exports = {
|
||||||
logged_in: false,
|
logged_in: false,
|
||||||
ready: false
|
ready: false
|
||||||
});
|
});
|
||||||
mxCliPeg.get().removeAllListeners();
|
MatrixClientPeg.get().removeAllListeners();
|
||||||
mxCliPeg.replace(null);
|
MatrixClientPeg.replace(null);
|
||||||
break;
|
break;
|
||||||
case 'view_room':
|
case 'view_room':
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -73,7 +73,7 @@ module.exports = {
|
||||||
case 'view_prev_room':
|
case 'view_prev_room':
|
||||||
roomIndexDelta = -1;
|
roomIndexDelta = -1;
|
||||||
case 'view_next_room':
|
case 'view_next_room':
|
||||||
var allRooms = mxCliPeg.get().getRooms();
|
var allRooms = MatrixClientPeg.get().getRooms();
|
||||||
var roomIndex = -1;
|
var roomIndex = -1;
|
||||||
for (var i = 0; i < allRooms.length; ++i) {
|
for (var i = 0; i < allRooms.length; ++i) {
|
||||||
if (allRooms[i].roomId == this.state.currentRoom) {
|
if (allRooms[i].roomId == this.state.currentRoom) {
|
||||||
|
@ -95,7 +95,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
startMatrixClient: function() {
|
startMatrixClient: function() {
|
||||||
var cli = mxCliPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
var that = this;
|
var that = this;
|
||||||
cli.on('syncComplete', function() {
|
cli.on('syncComplete', function() {
|
||||||
var firstRoom = null;
|
var firstRoom = null;
|
||||||
|
|
Loading…
Reference in New Issue