Better support for widgets overriding their URLs

Move the URL processing into AppTile so that the widget can have a
URL used for embedding in the page and a separate one for popping
out into a browser.
This commit is contained in:
David Baker 2020-04-01 10:00:33 +01:00
parent 78fd8e4569
commit 538147f7fa
6 changed files with 135 additions and 131 deletions

View file

@ -1,6 +1,6 @@
/*
Copyright 2018 New Vector Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -75,11 +75,7 @@ export default createReactClass({
const AppTile = sdk.getComponent('elements.AppTile');
return <AppTile
key={app.id}
id={app.id}
eventId={app.eventId}
url={app.url}
name={app.name}
type={app.type}
app={app}
fullWidth={true}
room={persistentWidgetInRoom}
userId={MatrixClientPeg.get().credentials.userId}