File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
framework/core/js/src/forum/components Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,22 @@ export default class PostStream extends Component {
78
78
content = < LoadingPost /> ;
79
79
}
80
80
81
- return (
81
+ const postStreamElement = (
82
82
< div className = "PostStream-item" { ...attrs } >
83
83
{ content }
84
84
</ div >
85
85
) ;
86
+
87
+ if ( i === 0 && this . afterFirstPostItems ( ) . toArray ( ) . length > 0 ) {
88
+ return m . fragment ( { ...attrs } , [
89
+ postStreamElement ,
90
+ < div className = "PostStream-item PostStream-afterFirstPost" key = "afterFirstPost" >
91
+ { this . afterFirstPostItems ( ) . toArray ( ) }
92
+ </ div > ,
93
+ ] ) ;
94
+ }
95
+
96
+ return postStreamElement ;
86
97
} ) ;
87
98
88
99
if ( ! viewingEnd && posts [ this . stream . visibleEnd - this . stream . visibleStart - 1 ] ) {
@@ -117,6 +128,15 @@ export default class PostStream extends Component {
117
128
) ;
118
129
}
119
130
131
+ /**
132
+ * @returns {ItemList<import('mithril').Children> }
133
+ */
134
+ afterFirstPostItems ( ) {
135
+ const items = new ItemList ( ) ;
136
+
137
+ return items ;
138
+ }
139
+
120
140
/**
121
141
* @returns {ItemList<import('mithril').Children> }
122
142
*/
You can’t perform that action at this time.
0 commit comments