From 63ee86a2de2f14677a99f2f7aaf2579d71f7e16c Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 4 Oct 2020 16:07:13 +0200 Subject: [PATCH] Fixed the channel info modal --- shared/js/ui/modal/ModalChannelInfo.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/shared/js/ui/modal/ModalChannelInfo.ts b/shared/js/ui/modal/ModalChannelInfo.ts index 2929f53d..040066c7 100644 --- a/shared/js/ui/modal/ModalChannelInfo.ts +++ b/shared/js/ui/modal/ModalChannelInfo.ts @@ -82,15 +82,18 @@ function apply_general(container: JQuery, channel: ChannelEntry) { /* chat mode */ { const tag = container.find(".chat-mode .value").empty(); - if (channel.properties.channel_flag_conversation_private || channel.properties.channel_flag_password) { + if(channel.properties.channel_conversation_mode === 0 || channel.properties.channel_flag_password) { tag.text(tr("Private")); - } else { - if (channel.properties.channel_conversation_history_length == -1) + } else if(channel.properties.channel_conversation_mode === 1) { + if (channel.properties.channel_conversation_history_length == -1) { tag.text(tr("Public; Semi permanent message saving")); - else if (channel.properties.channel_conversation_history_length == 0) + } else if (channel.properties.channel_conversation_history_length == 0) { tag.text(tr("Public; Permanent message saving")); - else + } else { tag.append(formatMessage(tr("Public; Saving last {} messages"), channel.properties.channel_conversation_history_length)); + } + } else { + tag.text(tr("No chatting")); } }