Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getEventTiles: function() {
var DateSeparator = sdk.getComponent('molecules.DateSeparator');
var cli = MatrixClientPeg.get();
var ret = [];
var count = 0;
var EventTile = sdk.getComponent('rooms.EventTile');
var self = this;
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
var results = this.state.searchResults.search_categories.room_events.results;
var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;
getEventTiles: function() {
var DateSeparator = sdk.getComponent('molecules.DateSeparator');
var cli = MatrixClientPeg.get();
var ret = [];
var count = 0;
var EventTile = sdk.getComponent('rooms.EventTile');
var self = this;
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
var results = this.state.searchResults.search_categories.room_events.results;
var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;
Object.keys(roomIdGroups)
.sort(function(a, b) { roomIdGroups[a].order - roomIdGroups[b].order }) // WHY NOT RETURN AN ORDERED ARRAY?!?!?!
.forEach(function(roomId)
{
// XXX: todo: merge overlapping results somehow?
// XXX: why doesn't searching on name work?
render() {
const AuthFooter = sdk.getComponent('auth.AuthFooter');
const brandingConfig = SdkConfig.get().branding;
let backgroundUrl = "themes/riot/img/backgrounds/valley.jpg";
if (brandingConfig && brandingConfig.welcomeBackgroundUrl) {
backgroundUrl = brandingConfig.welcomeBackgroundUrl;
}
const pageStyle = {
background: `center/cover fixed url(${backgroundUrl})`,
};
const modalStyle = {
position: 'relative',
background: 'initial',
};
q.all(deferreds).fail(function(err) {
var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Failed to set state",
description: err.toString()
});
}).finally(function() {
self.setState({
render() {
const TintableSvg = sdk.getComponent("elements.TintableSvg");
return <div>
<div>
{ _t('View Community') }
</div>
<hr>
<div>
<img height="15" width="15" src="img/icon_context_delete.svg">
{ _t('Remove') }
</div>
</div>;