You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
clean up EventTile:onWidgetLoad optional/required mess
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -154,6 +154,11 @@ module.exports = withMatrixClient(React.createClass({
|
||||
isTwelveHour: PropTypes.bool,
|
||||
},
|
||||
|
||||
defaultProps: {
|
||||
// no-op function because onWidgetLoad is optional yet some subcomponents assume its existence
|
||||
onWidgetLoad: function() {},
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
// Whether the context menu is being displayed.
|
||||
|
||||
@@ -75,11 +75,8 @@ export default class ReplyPreview extends React.Component {
|
||||
<EventTile last={true}
|
||||
tileShape="reply_preview"
|
||||
mxEvent={this.state.event}
|
||||
onWidgetLoad={dummyOnWidgetLoad}
|
||||
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")} />
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
||||
function dummyOnWidgetLoad() {}
|
||||
|
||||
Reference in New Issue
Block a user