mirror of https://github.com/vector-im/riot-web
clean up EventTile:onWidgetLoad optional/required mess
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
db55f87699
commit
ec4ec4717d
|
@ -154,6 +154,11 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
isTwelveHour: PropTypes.bool,
|
isTwelveHour: PropTypes.bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
defaultProps: {
|
||||||
|
// no-op function because onWidgetLoad is optional yet some subcomponents assume its existence
|
||||||
|
onWidgetLoad: function() {},
|
||||||
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
// Whether the context menu is being displayed.
|
// Whether the context menu is being displayed.
|
||||||
|
|
|
@ -75,11 +75,8 @@ export default class ReplyPreview extends React.Component {
|
||||||
<EventTile last={true}
|
<EventTile last={true}
|
||||||
tileShape="reply_preview"
|
tileShape="reply_preview"
|
||||||
mxEvent={this.state.event}
|
mxEvent={this.state.event}
|
||||||
onWidgetLoad={dummyOnWidgetLoad}
|
|
||||||
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")} />
|
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")} />
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dummyOnWidgetLoad() {}
|
|
||||||
|
|
Loading…
Reference in New Issue