{
});
return
-
+
;
}
}
diff --git a/src/components/views/elements/ReplyThread.js b/src/components/views/elements/ReplyThread.js
index 70592c72c5..2d17c858a2 100644
--- a/src/components/views/elements/ReplyThread.js
+++ b/src/components/views/elements/ReplyThread.js
@@ -28,6 +28,7 @@ import escapeHtml from "escape-html";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import {Action} from "../../../dispatcher/actions";
import sanitizeHtml from "sanitize-html";
+import {UIFeature} from "../../../settings/UIFeature";
// This component does no cycle detection, simply because the only way to make such a cycle would be to
// craft event_id's, using a homeserver that generates predictable event IDs; even then the impact would
@@ -366,6 +367,7 @@ export default class ReplyThread extends React.Component {
isRedacted={ev.isRedacted()}
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")}
useIRCLayout={this.props.useIRCLayout}
+ enableFlair={SettingsStore.getValue(UIFeature.Flair)}
/>
;
});
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js
index ab9f240f2d..f444fb1f1a 100644
--- a/src/components/views/rooms/EventTile.js
+++ b/src/components/views/rooms/EventTile.js
@@ -206,6 +206,9 @@ export default class EventTile extends React.Component {
// whether to use the irc layout
useIRCLayout: PropTypes.bool,
+
+ // whether or not to show flair at all
+ enableFlair: PropTypes.bool,
};
static defaultProps = {
@@ -736,10 +739,10 @@ export default class EventTile extends React.Component {
else if (msgtype === 'm.file') text = _td('%(senderName)s uploaded a file');
sender = ;
} else {
- sender = ;
+ sender = ;
}
}
diff --git a/src/components/views/rooms/ReplyPreview.js b/src/components/views/rooms/ReplyPreview.js
index de70338245..c7872d95ed 100644
--- a/src/components/views/rooms/ReplyPreview.js
+++ b/src/components/views/rooms/ReplyPreview.js
@@ -22,6 +22,7 @@ import RoomViewStore from '../../../stores/RoomViewStore';
import SettingsStore from "../../../settings/SettingsStore";
import PropTypes from "prop-types";
import {RoomPermalinkCreator} from "../../../utils/permalinks/Permalinks";
+import {UIFeature} from "../../../settings/UIFeature";
function cancelQuoting() {
dis.dispatch({
@@ -80,11 +81,14 @@ export default class ReplyPreview extends React.Component {
onClick={cancelQuoting} />
-
+
;
}
diff --git a/src/components/views/rooms/SearchResultTile.js b/src/components/views/rooms/SearchResultTile.js
index 136bd23729..8b2a9c2d61 100644
--- a/src/components/views/rooms/SearchResultTile.js
+++ b/src/components/views/rooms/SearchResultTile.js
@@ -19,6 +19,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import * as sdk from '../../../index';
import {haveTileForEvent} from "./EventTile";
+import SettingsStore from "../../../settings/SettingsStore";
+import {UIFeature} from "../../../settings/UIFeature";
export default class SearchResultTile extends React.Component {
static propTypes = {
@@ -45,18 +47,27 @@ export default class SearchResultTile extends React.Component {
const ret = [];
const timeline = result.context.getTimeline();
- for (var j = 0; j < timeline.length; j++) {
+ for (let j = 0; j < timeline.length; j++) {
const ev = timeline[j];
- var highlights;
+ let highlights;
const contextual = (j != result.context.getOurEventIndex());
if (!contextual) {
highlights = this.props.searchHighlights;
}
if (haveTileForEvent(ev)) {
- ret.push();
+ ret.push((
+
+ ));
}
}
return (
diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js
index 90eb60e632..9b8004d9d6 100644
--- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js
+++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.js
@@ -73,6 +73,18 @@ export default class GeneralRoomSettingsTab extends React.Component {
urlPreviewSettings = null;
}
+ let flairSection;
+ if (SettingsStore.getValue(UIFeature.Flair)) {
+ flairSection = <>
+ {_t("Flair")}
+
+
+
+ >;
+ }
+
return (
{_t("General")}
@@ -87,14 +99,8 @@ export default class GeneralRoomSettingsTab extends React.Component {
canonicalAliasEvent={canonicalAliasEv} aliasEvents={aliasEvents} />
{_t("Other")}
- {_t("Flair")}
-
-
-
-
- {urlPreviewSettings}
+ { flairSection }
+ { urlPreviewSettings }
{_t("Leave room")}
diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts
index 511daf5cc6..c57394d970 100644
--- a/src/settings/Settings.ts
+++ b/src/settings/Settings.ts
@@ -618,4 +618,8 @@ export const SETTINGS: {[setting: string]: ISetting} = {
supportedLevels: LEVELS_UI_FEATURE,
default: true,
},
+ [UIFeature.Flair]: {
+ supportedLevels: LEVELS_UI_FEATURE,
+ default: true,
+ },
};
diff --git a/src/settings/UIFeature.ts b/src/settings/UIFeature.ts
index e7355a98eb..8cbf7c207b 100644
--- a/src/settings/UIFeature.ts
+++ b/src/settings/UIFeature.ts
@@ -17,4 +17,5 @@ limitations under the License.
// see settings.md for documentation on conventions
export enum UIFeature {
URLPreviews = "UIFeature.urlPreviews",
+ Flair = "UIFeature.flair",
}