Fix private channel phrase in Discuss.

This commit is contained in:
John Preston 2019-06-23 14:34:48 +02:00
parent 352839337d
commit d864ebd695
2 changed files with 6 additions and 3 deletions

View file

@ -867,6 +867,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_manage_linked_channel_private" = "Any member of this group will be able to see messages in the channel.";
"lng_manage_discussion_group_private" = "Anyone from the channel will be able to see messages in this group.";
"lng_manage_discussion_group_link" = "Link group";
"lng_manage_linked_channel_private_status" = "private channel";
"lng_manage_discussion_group_private_status" = "private group";
"lng_manage_linked_channel_about" = "{channel} is linking the group as its discussion board.";
"lng_manage_linked_channel_unlink" = "Unlink channel";

View file

@ -80,9 +80,11 @@ void Controller::prepare() {
}
auto row = std::make_unique<PeerListRow>(chat);
const auto username = chat->userName();
row->setCustomStatus(username.isEmpty()
? tr::lng_manage_discussion_group_private_status(tr::now)
: ('@' + username));
row->setCustomStatus(!username.isEmpty()
? ('@' + username)
: (chat->isChannel() && !chat->isMegagroup())
? tr::lng_manage_linked_channel_private_status(tr::now)
: tr::lng_manage_discussion_group_private_status(tr::now));
delegate()->peerListAppendRow(std::move(row));
};
if (_chat) {