mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
detail pass on DMs
This commit is contained in:
parent
7a79b78292
commit
e224150190
3 changed files with 8 additions and 4 deletions
|
@ -363,7 +363,7 @@ export default class RoomBreadcrumbs extends React.Component {
|
|||
}
|
||||
|
||||
let dmIndicator;
|
||||
if (this._isDmRoom(r.room)) {
|
||||
if (this._isDmRoom(r.room) && !SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||
dmIndicator = <img
|
||||
src={require("../../../../res/img/icon_person.svg")}
|
||||
className="mx_RoomBreadcrumbs_dmIndicator"
|
||||
|
|
|
@ -31,6 +31,7 @@ import ManageIntegsButton from '../elements/ManageIntegsButton';
|
|||
import {CancelButton} from './SimpleRoomHeader';
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
import RoomHeaderButtons from '../right_panel/RoomHeaderButtons';
|
||||
import DMRoomMap from '../../../utils/DMRoomMap';
|
||||
import E2EIcon from './E2EIcon';
|
||||
import InviteOnlyIcon from './InviteOnlyIcon';
|
||||
|
||||
|
@ -161,10 +162,12 @@ export default createReactClass({
|
|||
<E2EIcon status={this.props.e2eStatus} /> :
|
||||
undefined;
|
||||
|
||||
const dmUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId);
|
||||
const joinRules = this.props.room && this.props.room.currentState.getStateEvents("m.room.join_rules", "");
|
||||
const joinRule = joinRules && joinRules.getContent().join_rule;
|
||||
let privateIcon;
|
||||
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||
// Don't show an invite-only icon for DMs. Users know they're invite-only.
|
||||
if (!dmUserId && SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||
if (joinRule == "invite") {
|
||||
privateIcon = <InviteOnlyIcon />;
|
||||
}
|
||||
|
|
|
@ -478,8 +478,9 @@ export default createReactClass({
|
|||
|
||||
let dmIndicator;
|
||||
let dmOnline;
|
||||
// If we can place a shield, do that instead
|
||||
if (dmUserId && !this.state.e2eStatus) {
|
||||
/* Post-cross-signing we don't show DM indicators at all, instead relying on user
|
||||
context to let them know when that is. */
|
||||
if (dmUserId && !SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||
dmIndicator = <img
|
||||
src={require("../../../../res/img/icon_person.svg")}
|
||||
className="mx_RoomTile_dm"
|
||||
|
|
Loading…
Reference in a new issue