@@ -181,6 +181,11 @@ class TopicDetail extends Component {
181181 let commentHeaderText =
182182 topic . replies > 0 ? ( topic . replies + '条评论' ) : '还没有评论,快来抢沙发!' ;
183183
184+ // Same with f227938f.
185+ if ( topic . user_id === 0 ) {
186+ topic . user_nick_name = '匿名' ;
187+ }
188+
184189 return (
185190 < View >
186191 < View style = { styles . top } >
@@ -409,18 +414,24 @@ class TopicDetail extends Component {
409414 keyExtractor = { ( item , index ) => index }
410415 removeClippedSubviews = { false }
411416 enableEmptySections = { true }
412- renderItem = { ( { item : comment } ) =>
413- < Comment
414- key = { comment . reply_posts_id }
415- comment = { comment }
416- currentUserId = { uid }
417- // `topicId` and `boardId` are not involved in `comment` here,
418- // which are necessary for topic reply API.
419- topicId = { this . topicId }
420- boardId = { this . boardId }
421- navigation = { navigation }
422- getCopyContent = { ( content ) => this . getCopyContent ( content ) } />
423- }
417+ renderItem = { ( { item : comment } ) => {
418+ // Same with f227938f.
419+ if ( comment . reply_id === 0 ) {
420+ comment . reply_name = '匿名' ;
421+ }
422+ return (
423+ < Comment
424+ key = { comment . reply_posts_id }
425+ comment = { comment }
426+ currentUserId = { uid }
427+ // `topicId` and `boardId` are not involved in `comment` here,
428+ // which are necessary for topic reply API.
429+ topicId = { this . topicId }
430+ boardId = { this . boardId }
431+ navigation = { navigation }
432+ getCopyContent = { ( content ) => this . getCopyContent ( content ) } />
433+ ) ;
434+ } }
424435 onEndReached = { ( ) => this . endReached ( ) }
425436 onEndReachedThreshold = { 0 }
426437 ListHeaderComponent = { ( ) => this . renderHeader ( ) }
0 commit comments