chat: potential fix for #1692

This commit is contained in:
Logan Allen 2019-09-04 16:07:49 -07:00
parent afc3338f68
commit 5560482897
5 changed files with 20 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -267,7 +267,7 @@ export class ChatScreen extends Component {
numMsgs={lastMsgNum}
station={state.station}
circle={state.circle}
security={config.con}
security={!!config ? config.con : {}}
placeholder='Message...' />
</div>
)

View File

@ -61,13 +61,23 @@ export class Root extends Component {
let internalStation = host + '/hall-internal-' + circle;
if (internalStation in state.configs) {
unreads[cir] =
state.configs[internalStation].red <=
messages[cir][messages[cir].length - 1].num;
if (!!state.configs[internalStation]) {
unreads[cir] =
state.configs[internalStation].red <=
messages[cir][messages[cir].length - 1].num;
} else {
unreads[cir] = false;
}
} else if (cir in state.configs) {
if (!!state.configs[cir]) {
unreads[cir] =
state.configs[cir].red <=
messages[cir][messages[cir].length - 1].num;
} else {
unreads[cir] = false;
}
} else {
unreads[cir] =
state.configs[cir].red <=
messages[cir][messages[cir].length - 1].num;
unreads[cir] = false;
}
}
} else {

View File

@ -110,6 +110,7 @@ export class Sidebar extends Component {
const { props, state } = this;
let station = props.match.params.ship + '/' + props.match.params.station;
console.log(props.circles);
let sidebarItems = props.circles
.filter((cir) => {
return !cir.includes('hall-internal-');