Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6159 from matrix-org/gsouquet/fix-showtimestamps-…
Browse files Browse the repository at this point in the history
…notifpanel

Add prop to alwaysShowTimestamps on TimelinePanel
  • Loading branch information
germain-gg authored Jun 7, 2021
2 parents 9419dd9 + 187a367 commit c6de1c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/structures/NotificationPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class NotificationPanel extends React.PureComponent<IProps> {
showUrlPreview={false}
tileShape="notif"
empty={emptyState}
alwaysShowTimestamps={true}
/>
);
} else {
Expand Down
5 changes: 4 additions & 1 deletion src/components/structures/TimelinePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ class TimelinePanel extends React.Component {

// which layout to use
layout: LayoutPropType,

// whether to always show timestamps for an event
alwaysShowTimestamps: PropTypes.bool,
}

// a map from room id to read marker event timestamp
Expand Down Expand Up @@ -1440,7 +1443,7 @@ class TimelinePanel extends React.Component {
onFillRequest={this.onMessageListFillRequest}
onUnfillRequest={this.onMessageListUnfillRequest}
isTwelveHour={this.state.isTwelveHour}
alwaysShowTimestamps={this.state.alwaysShowTimestamps}
alwaysShowTimestamps={this.props.alwaysShowTimestamps || this.state.alwaysShowTimestamps}
className={this.props.className}
tileShape={this.props.tileShape}
resizeNotifier={this.props.resizeNotifier}
Expand Down

0 comments on commit c6de1c3

Please sign in to comment.