Only consider is_falling_back when threads is enabled (#8083)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Germain 2022-03-22 08:25:39 +00:00 committed by GitHub
parent 4eba451176
commit 6639b60dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}