mirror of https://github.com/vector-im/riot-web
Hide pinned messages when grouped in timeline when feature pinning is disabled (#12888)
parent
4751c52d82
commit
d9846dc62d
|
@ -26,6 +26,7 @@ import DateSeparator from "../../views/messages/DateSeparator";
|
||||||
import HistoryTile from "../../views/rooms/HistoryTile";
|
import HistoryTile from "../../views/rooms/HistoryTile";
|
||||||
import EventListSummary from "../../views/elements/EventListSummary";
|
import EventListSummary from "../../views/elements/EventListSummary";
|
||||||
import { SeparatorKind } from "../../views/messages/TimelineSeparator";
|
import { SeparatorKind } from "../../views/messages/TimelineSeparator";
|
||||||
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
|
||||||
const groupedStateEvents = [
|
const groupedStateEvents = [
|
||||||
EventType.RoomMember,
|
EventType.RoomMember,
|
||||||
|
@ -97,6 +98,12 @@ export class MainGrouper extends BaseGrouper {
|
||||||
// absorb hidden events to not split the summary
|
// absorb hidden events to not split the summary
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ev.getType() === EventType.RoomPinnedEvents && !SettingsStore.getValue("feature_pinning")) {
|
||||||
|
// If pinned messages are disabled, don't show the summary
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.events.push(wrappedEvent);
|
this.events.push(wrappedEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue