Fix Room Tile Icon to not ignore DMs in other tags
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8546d09fc4
commit
c94c937b31
2 changed files with 4 additions and 4 deletions
|
@ -66,7 +66,7 @@ export default class DecoratedRoomAvatar extends React.PureComponent<IProps, ISt
|
||||||
oobData={this.props.oobData}
|
oobData={this.props.oobData}
|
||||||
viewAvatarOnClick={this.props.viewAvatarOnClick}
|
viewAvatarOnClick={this.props.viewAvatarOnClick}
|
||||||
/>
|
/>
|
||||||
<RoomTileIcon room={this.props.room} tag={this.props.tag} />
|
<RoomTileIcon room={this.props.room} />
|
||||||
{badge}
|
{badge}
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,6 @@ function tooltipText(variant: Icon) {
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
room: Room;
|
room: Room;
|
||||||
tag: TagID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IState {
|
interface IState {
|
||||||
|
@ -137,10 +136,11 @@ export default class RoomTileIcon extends React.Component<IProps, IState> {
|
||||||
private calculateIcon(): Icon {
|
private calculateIcon(): Icon {
|
||||||
let icon = Icon.None;
|
let icon = Icon.None;
|
||||||
|
|
||||||
if (this.props.tag === DefaultTagID.DM && this.props.room.getJoinedMemberCount() === 2) {
|
// We look at the DMRoomMap and not the tag here so that we don't exclude DMs in Favourites
|
||||||
|
const otherUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId);
|
||||||
|
if (otherUserId && this.props.room.getJoinedMemberCount() === 2) {
|
||||||
// Track presence, if available
|
// Track presence, if available
|
||||||
if (isPresenceEnabled()) {
|
if (isPresenceEnabled()) {
|
||||||
const otherUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId);
|
|
||||||
if (otherUserId) {
|
if (otherUserId) {
|
||||||
this.dmUser = MatrixClientPeg.get().getUser(otherUserId);
|
this.dmUser = MatrixClientPeg.get().getUser(otherUserId);
|
||||||
icon = this.getPresenceIcon();
|
icon = this.getPresenceIcon();
|
||||||
|
|
Loading…
Reference in a new issue