You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
discard stale search results
This commit is contained in:
@ -459,6 +459,12 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).then(function(data) {
|
}).then(function(data) {
|
||||||
|
|
||||||
|
if (!self.state.searching || term !== self.refs.search_bar.refs.search_term.value) {
|
||||||
|
console.error("Discarding stale search results");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// for debugging:
|
// for debugging:
|
||||||
// data.search_categories.room_events.highlights = ["hello", "everybody"];
|
// data.search_categories.room_events.highlights = ["hello", "everybody"];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user