Skip to content

Commit 7cbd064

Browse files
DEV: Update for glimmer topic list (#66)
1 parent a5ff337 commit 7cbd064

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.discourse-compatibility

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
< 3.4.0.beta4-dev: a5ff3374335f17b46654c4ae1e5be7b539c2da1a
12
< 3.4.0.beta1-dev: 93551f55d6e9f8d688f1f9dc0b6a2f14eb08b603
23
< 3.3.0.beta1-dev: 85dc24d6b58d1b16e6d225ae710633dc20c34d08
34
3.1.999: 1e5882a1541b932f9512f6a7d667b333c1708f53
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
import { apiInitializer } from "discourse/lib/api";
2+
import { withSilencedDeprecations } from "discourse-common/lib/deprecated";
23

34
export default apiInitializer("0.8", (api) => {
4-
api.modifyClass("component:topic-list-item", {
5-
pluginId: "discourse-air",
6-
expandPinned: true,
7-
});
5+
const transformerExists = api.registerValueTransformer(
6+
"topic-list-item-expand-pinned",
7+
() => true
8+
);
9+
10+
if (!transformerExists) {
11+
withSilencedDeprecations("discourse.hbr-topic-list-overrides", () => {
12+
api.modifyClass("component:topic-list-item", {
13+
pluginId: "discourse-air",
14+
expandPinned: true,
15+
});
16+
});
17+
}
818
});

0 commit comments

Comments
 (0)