1
1
import HeaderPostersCell from " discourse/components/topic-list/header/posters-cell" ;
2
2
import avatar from " discourse/helpers/avatar" ;
3
+ import { withSilencedDeprecations } from " discourse/lib/deprecated" ;
3
4
import { withPluginApi } from " discourse/lib/plugin-api" ;
4
5
5
6
const ItemCell = <template >
@@ -14,7 +15,8 @@ const ItemCell = <template>
14
15
href ={{poster.user.path }}
15
16
data-user-card ={{poster.user.username }}
16
17
class ={{poster.extraClasses }}
17
- >{{avatar
18
+ >
19
+ {{avatar
18
20
poster
19
21
avatarTemplatePath =" user.avatar_template"
20
22
usernamePath =" user.username"
@@ -30,11 +32,18 @@ export default {
30
32
name: " discourse-avatar-component" ,
31
33
32
34
initialize () {
33
- withPluginApi (" 1.34.0" , (api ) => {
34
- api .changeWidgetSetting (
35
- " post-avatar" ,
36
- " size" ,
37
- settings .topic_avatars_size
35
+ withPluginApi ((api ) => {
36
+ api .registerValueTransformer (
37
+ " post-avatar-size" ,
38
+ () => settings .topic_avatars_size
39
+ );
40
+
41
+ withSilencedDeprecations (" discourse.post-stream-widget-overrides" , () =>
42
+ api .changeWidgetSetting (
43
+ " post-avatar" ,
44
+ " size" ,
45
+ settings .topic_avatars_size
46
+ )
38
47
);
39
48
40
49
api .registerValueTransformer (
0 commit comments