@@ -40,23 +40,29 @@ class ChannelActionsViewController: BaseViewController {
4040 let hasAnnouncement = !( subscription. roomAnnouncement? . isEmpty ?? true )
4141 let hasTopic = !( subscription. roomTopic? . isEmpty ?? true )
4242
43- header = [
44- ChannelInfoBasicCellData ( title: " # \( subscription. name) " ) ,
45- ChannelInfoDescriptionCellData (
43+ header = [ ChannelInfoBasicCellData ( title: " # \( subscription. name) " ) ]
44+
45+
46+ if hasDescription {
47+ header? . append ( ChannelInfoDescriptionCellData (
4648 title: localized ( " chat.info.item.description " ) ,
47- descriptionText: hasDescription ? subscription. roomDescription : localized ( " chat.info.item.no_description " )
48- ) ,
49- ChannelInfoDescriptionCellData (
49+ descriptionText: subscription. roomDescription
50+ ) )
51+ }
52+
53+ if hasAnnouncement {
54+ header? . append ( ChannelInfoDescriptionCellData (
5055 title: localized ( " chat.info.item.announcement " ) ,
51- descriptionText: hasAnnouncement ?
52- subscription. roomAnnouncement :
53- localized ( " chat.info.item.no_announcement " )
54- ) ,
55- ChannelInfoDescriptionCellData (
56+ descriptionText: subscription. roomAnnouncement
57+ ) )
58+ }
59+
60+ if hasTopic {
61+ header? . append ( ChannelInfoDescriptionCellData (
5662 title: localized ( " chat.info.item.topic " ) ,
57- descriptionText: hasTopic ? subscription. roomTopic : localized ( " chat.info.item.no_topic " )
58- )
59- ]
63+ descriptionText: subscription. roomTopic
64+ ) )
65+ }
6066 }
6167
6268 func title( for menuTitle: String ) -> String {
0 commit comments