From 63e5c44c63f70137ef36ec11fa3bcedf34f0737a Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 13 Jan 2020 11:48:51 +0000 Subject: [PATCH] Add feature flag around the presence indicator in room list This adds a feature flag (disabled by default for now) around the room list presence indicator, as it still needs some tweaking before it's ready for production use. Part of https://github.com/vector-im/riot-web/issues/11799 --- src/components/views/rooms/RoomTile.js | 5 ++++- src/i18n/strings/en_EN.json | 1 + src/settings/Settings.js | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 241713c97d..f0c1a23c9c 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -381,7 +381,10 @@ module.exports = createReactClass({ const { room } = this.props; const member = room.getMember(dmUserId); - if (member && member.membership === "join" && room.getJoinedMemberCount() === 2) { + if ( + member && member.membership === "join" && room.getJoinedMemberCount() === 2 && + SettingsStore.isFeatureEnabled("feature_presence_in_room_list") + ) { const UserOnlineDot = sdk.getComponent('rooms.UserOnlineDot'); dmOnline = ; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9c2105afab..fe64a7df12 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -359,6 +359,7 @@ "Multiple integration managers": "Multiple integration managers", "Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)", "New DM invite dialog (under development)": "New DM invite dialog (under development)", + "Show a presence dot next to DMs in the room list": "Show a presence dot next to DMs in the room list", "Enable cross-signing to verify per-user instead of per-device (in development)": "Enable cross-signing to verify per-user instead of per-device (in development)", "Enable local event indexing and E2EE search (requires restart)": "Enable local event indexing and E2EE search (requires restart)", "Show info about bridges in room settings": "Show info about bridges in room settings", diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 14208e1f03..8ee8d89890 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -134,6 +134,12 @@ export const SETTINGS = { supportedLevels: LEVELS_FEATURE, default: false, }, + "feature_presence_in_room_list": { + isFeature: true, + displayName: _td("Show a presence dot next to DMs in the room list"), + supportedLevels: LEVELS_FEATURE, + default: false, + }, "mjolnirRooms": { supportedLevels: ['account'], default: [],