mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
Use better variable names
This commit is contained in:
parent
f384aa7d9e
commit
370310bf82
@ -99,9 +99,9 @@ module.exports = {
|
||||
getRoomList: function() {
|
||||
return RoomListSorter.mostRecentActivityFirst(
|
||||
MatrixClientPeg.get().getRooms().filter(function(room) {
|
||||
var member = room.getMember(MatrixClientPeg.get().credentials.userId);
|
||||
var me = room.getMember(MatrixClientPeg.get().credentials.userId);
|
||||
var shouldShowRoom = (
|
||||
member && (member.membership == "join" || member.membership == "invite")
|
||||
me && (me.membership == "join" || me.membership == "invite")
|
||||
);
|
||||
// hiding conf rooms only ever toggles shouldShowRoom to false
|
||||
if (shouldShowRoom && HIDE_CONFERENCE_CHANS) {
|
||||
@ -109,7 +109,7 @@ module.exports = {
|
||||
var joinedMembers = room.getJoinedMembers();
|
||||
if (joinedMembers.length === 2) {
|
||||
var otherMember = joinedMembers.filter(function(m) {
|
||||
return m.userId !== member.userId
|
||||
return m.userId !== me.userId
|
||||
})[0];
|
||||
if (ConferenceHandler.isConferenceUser(otherMember)) {
|
||||
// console.log("Hiding conference 1:1 room %s", room.roomId);
|
||||
|
@ -187,22 +187,21 @@ module.exports = {
|
||||
},
|
||||
|
||||
_updateConfCallNotification: function() {
|
||||
var member = MatrixClientPeg.get().getRoom(this.props.roomId).getMember(
|
||||
var confMember = MatrixClientPeg.get().getRoom(this.props.roomId).getMember(
|
||||
ConferenceHandler.getConferenceUserIdForRoom(this.props.roomId)
|
||||
);
|
||||
|
||||
if (!member) {
|
||||
if (!confMember) {
|
||||
return;
|
||||
}
|
||||
console.log("_updateConfCallNotification");
|
||||
var confCall = CallHandler.getConferenceCall(member.roomId);
|
||||
var confCall = CallHandler.getConferenceCall(confMember.roomId);
|
||||
|
||||
// A conf call notification should be displayed if there is an ongoing
|
||||
// conf call but this cilent isn't a part of it.
|
||||
this.setState({
|
||||
displayConfCallNotification: (
|
||||
(!confCall || confCall.call_state === "ended") &&
|
||||
member.membership === "join"
|
||||
confMember.membership === "join"
|
||||
)
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user