Merge branch 'la-1692-fix' (#1693)

* la-1692-fix:
  chat: potential fix for #1692

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2019-09-05 09:31:33 -02:30
commit bf1392de3d
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
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-');