topic redirects work now, bug with starting topic from search results fixed

This commit is contained in:
or-else
2020-09-04 11:01:44 -07:00
parent 6019303f2c
commit 9401a8d483
8 changed files with 101 additions and 34 deletions
+3 -3
View File
@@ -726,7 +726,7 @@ class TinodeWeb extends React.Component {
}
// User clicked on a contact in the side panel or deleted a contact.
handleTopicSelected(topicName, unused_index, online, acs) {
handleTopicSelected(topicName) {
// Clear newTopicParams after use.
if (this.state.newTopicParams && this.state.newTopicParams._topicName != topicName) {
this.setState({
@@ -744,8 +744,8 @@ class TinodeWeb extends React.Component {
// Different contact selected.
if (this.state.topicSelected != topicName) {
this.setState({
topicSelectedOnline: online,
topicSelectedAcs: acs
topicSelectedOnline: this.tinode.isTopicOnline(topicName),
topicSelectedAcs: this.tinode.getTopicAccessMode(topicName)
});
HashNavigation.navigateTo(HashNavigation.setUrlTopic('', topicName));
}
+2 -1
View File
@@ -18,7 +18,8 @@ export default class Contact extends React.Component {
e.preventDefault();
e.stopPropagation();
if (this.props.onSelected) {
this.props.onSelected(this.props.item, this.props.index, this.props.now, this.props.acs);
// Index this.props.index is used by GroupManager.
this.props.onSelected(this.props.item, this.props.index);
}
}