forked from matrix/element-web
improve layout for search results, fix syntax highlighting quirks in sublime, and don't crash on zero results
This commit is contained in:
parent
af6bd53d38
commit
9a64dc27fc
|
@ -502,7 +502,10 @@ module.exports = {
|
||||||
var EventTile = sdk.getComponent('messages.Event');
|
var EventTile = sdk.getComponent('messages.Event');
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if (this.state.searchResults) {
|
if (this.state.searchResults &&
|
||||||
|
this.state.searchResults.search_categories.room_events.results &&
|
||||||
|
this.state.searchResults.search_categories.room_events.groups)
|
||||||
|
{
|
||||||
// XXX: this dance is foul, due to the results API not directly returning sorted results
|
// XXX: this dance is foul, due to the results API not directly returning sorted results
|
||||||
var results = this.state.searchResults.search_categories.room_events.results;
|
var results = this.state.searchResults.search_categories.room_events.results;
|
||||||
var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;
|
var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;
|
||||||
|
|
|
@ -291,16 +291,8 @@ module.exports = React.createClass({
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
var statusArea, messageComposer;
|
var messageComposer;
|
||||||
if (!this.state.searchResults) {
|
if (!this.state.searchResults) {
|
||||||
statusArea =
|
|
||||||
<div className="mx_RoomView_statusArea">
|
|
||||||
<div className="mx_RoomView_statusAreaBox">
|
|
||||||
<div className="mx_RoomView_statusAreaBox_line"></div>
|
|
||||||
{statusBar}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
messageComposer =
|
messageComposer =
|
||||||
<MessageComposer room={this.state.room} roomView={this} uploadFile={this.uploadFile} />
|
<MessageComposer room={this.state.room} roomView={this} uploadFile={this.uploadFile} />
|
||||||
}
|
}
|
||||||
|
@ -324,7 +316,12 @@ module.exports = React.createClass({
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</GeminiScrollbar>
|
</GeminiScrollbar>
|
||||||
{ statusArea }
|
<div className="mx_RoomView_statusArea">
|
||||||
|
<div className="mx_RoomView_statusAreaBox">
|
||||||
|
<div className="mx_RoomView_statusAreaBox_line"></div>
|
||||||
|
{ this.state.searchResults ? null : statusBar }
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{ messageComposer }
|
{ messageComposer }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue