mirror of https://github.com/vector-im/riot-web
make FilePanel work, superficially at least
parent
b4c1eca1c5
commit
e5dd2e0b46
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var ReactDOM = require("react-dom");
|
var ReactDOM = require("react-dom");
|
||||||
|
|
||||||
|
var Matrix = require("matrix-js-sdk");
|
||||||
var sdk = require('../../index');
|
var sdk = require('../../index');
|
||||||
var MatrixClientPeg = require("../../MatrixClientPeg");
|
var MatrixClientPeg = require("../../MatrixClientPeg");
|
||||||
var dis = require("../../dispatcher");
|
var dis = require("../../dispatcher");
|
||||||
|
@ -70,11 +71,13 @@ var FilePanel = React.createClass({
|
||||||
// this has to be a proper method rather than an unnamed function,
|
// this has to be a proper method rather than an unnamed function,
|
||||||
// otherwise react calls it with null on each update.
|
// otherwise react calls it with null on each update.
|
||||||
_gatherTimelinePanelRef: function(r) {
|
_gatherTimelinePanelRef: function(r) {
|
||||||
this.refs.messagePanel = r;
|
//this.refs.messagePanel = r;
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
// wrap a TimelinePanel with the jump-to-event bits turned off.
|
// wrap a TimelinePanel with the jump-to-event bits turned off.
|
||||||
|
var TimelinePanel = sdk.getComponent("structures.TimelinePanel");
|
||||||
|
var Loader = sdk.getComponent("elements.Spinner");
|
||||||
|
|
||||||
// <TimelinePanel ref={this._gatherTimelinePanelRef}
|
// <TimelinePanel ref={this._gatherTimelinePanelRef}
|
||||||
// room={this.state.room}
|
// room={this.state.room}
|
||||||
|
@ -87,16 +90,21 @@ var FilePanel = React.createClass({
|
||||||
// showUrlPreview = { this.state.showUrlPreview }
|
// showUrlPreview = { this.state.showUrlPreview }
|
||||||
// opacity={ this.props.opacity }
|
// opacity={ this.props.opacity }
|
||||||
|
|
||||||
return (
|
if (this.state.timelineSet) {
|
||||||
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
return (
|
||||||
manageReadReceipts={false}
|
<TimelinePanel ref={this._gatherTimelinePanelRef}
|
||||||
manageReadMarkers={false}
|
manageReadReceipts={false}
|
||||||
timelineSet={this.state.timelineSet}
|
manageReadMarkers={false}
|
||||||
showUrlPreview = { false }
|
timelineSet={this.state.timelineSet}
|
||||||
opacity={ this.props.opacity }
|
showUrlPreview = { false }
|
||||||
/>
|
opacity={ this.props.opacity }
|
||||||
);
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return <Loader/>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = NotificationPanel;
|
module.exports = FilePanel;
|
||||||
|
|
Loading…
Reference in New Issue