From b18622efe492860153bf60a92ea56ce49dbd4480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 25 Feb 2021 08:20:34 +0100 Subject: [PATCH] Show full date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/elements/ImageView.js | 6 +++--- src/components/views/messages/MessageTimestamp.js | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index f7826d45fe..5acd36bde0 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -30,7 +30,7 @@ import MessageContextMenu from "../context_menus/MessageContextMenu"; import {aboveLeftOf, ContextMenu} from '../../structures/ContextMenu'; import MessageTimestamp from "../messages/MessageTimestamp"; import SettingsStore from "../../../settings/SettingsStore"; -import {formatTime} from "../../../DateUtils"; +import {formatFullDate} from "../../../DateUtils"; import dis from '../../../dispatcher/dispatcher'; export default class ImageView extends React.Component { @@ -286,9 +286,9 @@ export default class ImageView extends React.Component { - + ); diff --git a/src/components/views/messages/MessageTimestamp.js b/src/components/views/messages/MessageTimestamp.js index 199a6f47ce..26b8096c4f 100644 --- a/src/components/views/messages/MessageTimestamp.js +++ b/src/components/views/messages/MessageTimestamp.js @@ -23,13 +23,18 @@ export default class MessageTimestamp extends React.Component { static propTypes = { ts: PropTypes.number.isRequired, showTwelveHour: PropTypes.bool, + showFullDate: PropTypes.bool, }; render() { const date = new Date(this.props.ts); return ( - { formatTime(date, this.props.showTwelveHour) } + { + this.props.showFullDate ? + formatFullDate(date, this.props.showTwelveHour) : + formatTime(date, this.props.showTwelveHour) + } ); }