correctly display an invalid topic

This commit is contained in:
or-else
2018-04-26 21:45:29 -07:00
parent ff67a6d3d2
commit c9c6bf1cef
+6 -2
View File
@@ -3858,10 +3858,14 @@
}
}
// Topic for MessagesView selector.
if (hash.path.length > 1) {
if (hash.path.length > 1 && hash.path[1] != this.state.topicSelected) {
var tp = Tinode.getTopicType(hash.path[1]);
if (tp) {
this.setState({topicSelected: hash.path[1]});
this.setState({
topicSelected: hash.path[1],
topicSelectedOnline: false,
topicSelectedAcs: null
});
} else {
this.setState({topicSelected: null});
}