diff --git a/src/components/contextmenus/ChannelDropDown.jsx b/src/components/contextmenus/ChannelDropDown.jsx
index bc66899..4e2a58f 100644
--- a/src/components/contextmenus/ChannelDropDown.jsx
+++ b/src/components/contextmenus/ChannelDropDown.jsx
@@ -108,7 +108,7 @@ const ChannelDropDown = ({
if (channels[chatChannel]) {
setChatChannelName(channels[chatChannel][0]);
}
- }, [chatChannel]);
+ }, [chatChannel, channels]);
return (
- {(ownName) ? (
-
-
-
- ) : (
-
dispatch(showUserAreaModal())}
- style={{ textAlign: 'center', fontSize: 13 }}
- role="button"
- tabIndex={0}
- >
- {t`You must be logged in to chat`}
-
- )}
+ >
+ ) : (
+
dispatch(showUserAreaModal())}
+ style={{
+ textAlign: 'center',
+ fontSize: 13,
+ flexGrow: 1,
+ }}
+ role="button"
+ tabIndex={0}
+ >
+ {t`You must be logged in to chat`}
+
+ )}
+
+
);
};
diff --git a/src/reducers/chat.js b/src/reducers/chat.js
index 2346515..dd54cac 100644
--- a/src/reducers/chat.js
+++ b/src/reducers/chat.js
@@ -55,7 +55,7 @@ export default function chat(
const keys = Object.keys(channels);
for (let i = 0; i < keys.length; i += 1) {
const cid = keys[i];
- if (channels[cid][1] === 0) {
+ if (channels[cid][1] !== 0) {
delete messages[cid];
delete channels[cid];
}
diff --git a/src/styles/default.css b/src/styles/default.css
index 65fa32b..f262ba5 100644
--- a/src/styles/default.css
+++ b/src/styles/default.css
@@ -664,6 +664,7 @@ tr:nth-child(even) {
.chatinput {
height: 24px;
white-space: nowrap;
+ display: flex;
}
.chathead {
display: flex;