Extract editWidget into WidgetUtils

This commit is contained in:
Michael Telatynski 2020-09-07 16:17:25 +01:00
parent b75e2aa299
commit 48d9c94c88
2 changed files with 11 additions and 14 deletions

View file

@ -310,20 +310,7 @@ export default class AppTile extends React.Component {
if (this.props.onEditClick) {
this.props.onEditClick();
} else {
// TODO: Open the right manager for the widget
if (SettingsStore.getValue("feature_many_integration_managers")) {
IntegrationManagers.sharedInstance().openAll(
this.props.room,
'type_' + this.props.app.type,
this.props.app.id,
);
} else {
IntegrationManagers.sharedInstance().getPrimaryManager().open(
this.props.room,
'type_' + this.props.app.type,
this.props.app.id,
);
}
WidgetUtils.editWidget(this.props.room, this.props.app);
}
}