Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Disable presence controls if there's no presence #1623

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/views/avatars/MemberPresenceAvatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import dispatcher from "../../../dispatcher";
import * as ContextualMenu from "../../structures/ContextualMenu";
import SettingsStore from "../../../settings/SettingsStore";

// This is just an avatar with a presence indicator for the user on it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and the option to change the presence?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richvdh updated

module.exports = React.createClass({
displayName: 'MemberPresenceAvatar',

Expand Down Expand Up @@ -142,7 +143,8 @@ module.exports = React.createClass({
);

// LABS: Disable presence management functions for now
if (!SettingsStore.isFeatureEnabled("feature_presence_management")) {
// Also disable the presence information if there's no status information
if (!SettingsStore.isFeatureEnabled("feature_presence_management") || !this.state.status) {
statusNode = null;
onClickFn = null;
}
Expand Down