Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions Rocket.Chat/Controllers/Chat/ChannelActionsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,29 @@ class ChannelActionsViewController: BaseViewController {
let hasAnnouncement = !(subscription.roomAnnouncement?.isEmpty ?? true)
let hasTopic = !(subscription.roomTopic?.isEmpty ?? true)

header = [
ChannelInfoBasicCellData(title: "#\(subscription.name)"),
ChannelInfoDescriptionCellData(
header = [ChannelInfoBasicCellData(title: "#\(subscription.name)")]


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)

if hasDescription {
header?.append(ChannelInfoDescriptionCellData(
title: localized("chat.info.item.description"),
descriptionText: hasDescription ? subscription.roomDescription : localized("chat.info.item.no_description")
),
ChannelInfoDescriptionCellData(
descriptionText: subscription.roomDescription
))
}

if hasAnnouncement {
header?.append(ChannelInfoDescriptionCellData(
title: localized("chat.info.item.announcement"),
descriptionText: hasAnnouncement ?
subscription.roomAnnouncement :
localized("chat.info.item.no_announcement")
),
ChannelInfoDescriptionCellData(
descriptionText: subscription.roomAnnouncement
))
}

if hasTopic {
header?.append(ChannelInfoDescriptionCellData(
title: localized("chat.info.item.topic"),
descriptionText: hasTopic ? subscription.roomTopic : localized("chat.info.item.no_topic")
)
]
descriptionText: subscription.roomTopic
))
}
}

func title(for menuTitle: String) -> String {
Expand Down