From 6639b60dfd11da2a7712fe915b926d08d38292d0 Mon Sep 17 00:00:00 2001 From: Germain Date: Tue, 22 Mar 2022 08:25:39 +0000 Subject: [PATCH] Only consider is_falling_back when threads is enabled (#8083) Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- src/utils/Reply.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/Reply.ts b/src/utils/Reply.ts index 7c5d92fc46..3d62bb946c 100644 --- a/src/utils/Reply.ts +++ b/src/utils/Reply.ts @@ -22,6 +22,7 @@ import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread"; import { PERMITTED_URL_SCHEMES } from "../HtmlUtils"; import { makeUserPermalink, RoomPermalinkCreator } from "./permalinks/Permalinks"; import { RecursivePartial } from "../@types/common"; +import SettingsStore from "../settings/SettingsStore"; export function getParentEventId(ev: MatrixEvent): string | undefined { if (!ev || ev.isRedacted()) return; @@ -178,7 +179,10 @@ export function shouldDisplayReply(event: MatrixEvent): boolean { } const relation = event.getRelation(); - if (relation?.rel_type === THREAD_RELATION_TYPE.name && relation?.is_falling_back) { + if (SettingsStore.getValue("feature_thread") && + relation?.rel_type === THREAD_RELATION_TYPE.name && + relation?.is_falling_back + ) { return false; }