Convert devtools dialog to use new room state format
This commit is contained in:
parent
ada68c4220
commit
545f11d742
1 changed files with 7 additions and 7 deletions
|
@ -412,13 +412,13 @@ class RoomStateExplorer extends React.PureComponent {
|
||||||
if (this.state.eventType === null) {
|
if (this.state.eventType === null) {
|
||||||
list = <FilteredList query={this.state.queryEventType} onChange={this.onQueryEventType}>
|
list = <FilteredList query={this.state.queryEventType} onChange={this.onQueryEventType}>
|
||||||
{
|
{
|
||||||
Object.keys(this.roomStateEvents).map((evType) => {
|
Array.from(this.roomStateEvents.keys()).map((evType) => {
|
||||||
const stateGroup = this.roomStateEvents[evType];
|
const stateGroup = this.roomStateEvents.get(evType);
|
||||||
const stateKeys = Object.keys(stateGroup);
|
const stateKeys = Array.from(stateGroup.keys());
|
||||||
|
|
||||||
let onClickFn;
|
let onClickFn;
|
||||||
if (stateKeys.length === 1 && stateKeys[0] === '') {
|
if (stateKeys.length === 1 && stateKeys[0] === '') {
|
||||||
onClickFn = this.onViewSourceClick(stateGroup[stateKeys[0]]);
|
onClickFn = this.onViewSourceClick(stateGroup.get(stateKeys[0]));
|
||||||
} else {
|
} else {
|
||||||
onClickFn = this.browseEventType(evType);
|
onClickFn = this.browseEventType(evType);
|
||||||
}
|
}
|
||||||
|
@ -430,12 +430,12 @@ class RoomStateExplorer extends React.PureComponent {
|
||||||
}
|
}
|
||||||
</FilteredList>;
|
</FilteredList>;
|
||||||
} else {
|
} else {
|
||||||
const stateGroup = this.roomStateEvents[this.state.eventType];
|
const stateGroup = this.roomStateEvents.get(this.state.eventType);
|
||||||
|
|
||||||
list = <FilteredList query={this.state.queryStateKey} onChange={this.onQueryStateKey}>
|
list = <FilteredList query={this.state.queryStateKey} onChange={this.onQueryStateKey}>
|
||||||
{
|
{
|
||||||
Object.keys(stateGroup).map((stateKey) => {
|
Array.from(stateGroup.keys()).map((stateKey) => {
|
||||||
const ev = stateGroup[stateKey];
|
const ev = stateGroup.get(stateKey);
|
||||||
return <button className={classes} key={stateKey} onClick={this.onViewSourceClick(ev)}>
|
return <button className={classes} key={stateKey} onClick={this.onViewSourceClick(ev)}>
|
||||||
{ stateKey }
|
{ stateKey }
|
||||||
</button>;
|
</button>;
|
||||||
|
|
Loading…
Reference in a new issue