Link search results to the right room
Fixes https://github.com/vector-im/vector-web/issues/980pull/21833/head
parent
d7b3a24c18
commit
26e66326a2
|
@ -927,6 +927,7 @@ module.exports = React.createClass({
|
||||||
var result = this.state.searchResults.results[i];
|
var result = this.state.searchResults.results[i];
|
||||||
|
|
||||||
var mxEv = result.context.getEvent();
|
var mxEv = result.context.getEvent();
|
||||||
|
var roomId = mxEv.getRoomId();
|
||||||
|
|
||||||
if (!EventTile.haveTileForEvent(mxEv)) {
|
if (!EventTile.haveTileForEvent(mxEv)) {
|
||||||
// XXX: can this ever happen? It will make the result count
|
// XXX: can this ever happen? It will make the result count
|
||||||
|
@ -935,7 +936,6 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.searchScope === 'All') {
|
if (this.state.searchScope === 'All') {
|
||||||
var roomId = mxEv.getRoomId();
|
|
||||||
if(roomId != lastRoomId) {
|
if(roomId != lastRoomId) {
|
||||||
var room = cli.getRoom(roomId);
|
var room = cli.getRoom(roomId);
|
||||||
|
|
||||||
|
@ -952,7 +952,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var resultLink = "#/room/"+this.props.roomId+"/"+mxEv.getId();
|
var resultLink = "#/room/"+roomId+"/"+mxEv.getId();
|
||||||
|
|
||||||
ret.push(<SearchResultTile key={mxEv.getId()}
|
ret.push(<SearchResultTile key={mxEv.getId()}
|
||||||
searchResult={result}
|
searchResult={result}
|
||||||
|
|
Loading…
Reference in New Issue