summaryrefslogtreecommitdiffstats
path: root/webapp/components/search_results_item.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-06-15 08:13:17 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-06-15 08:13:17 -0400
commitba77aefe02159325752cfa79210f5e4b5fcef77e (patch)
tree48d41a615a07e6867a36baaa78d227a87e422348 /webapp/components/search_results_item.jsx
parent3f4d38f58ae086c6570bea7082f25cbdbc52c85d (diff)
downloadchat-ba77aefe02159325752cfa79210f5e4b5fcef77e.tar.gz
chat-ba77aefe02159325752cfa79210f5e4b5fcef77e.tar.bz2
chat-ba77aefe02159325752cfa79210f5e4b5fcef77e.zip
PLT-3202 Re-render timestamps when display settings switch between 12h and 24h (#3337)
* Made post timestamp switch from 12h to 24h without refreshing * Made RHS post timestamps switch from 12h to 24h without refreshing
Diffstat (limited to 'webapp/components/search_results_item.jsx')
-rw-r--r--webapp/components/search_results_item.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index d8e471110..3fff4ea33 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -113,7 +113,7 @@ export default class SearchResultsItem extends React.Component {
<time className='search-item-time'>
<FormattedDate
value={post.create_at}
- hour12={!Utils.isMilitaryTime()}
+ hour12={!this.props.useMilitaryTime}
hour='2-digit'
minute='2-digit'
/>
@@ -186,5 +186,6 @@ SearchResultsItem.propTypes = {
user: React.PropTypes.object,
channel: React.PropTypes.object,
isMentionSearch: React.PropTypes.bool,
- term: React.PropTypes.string
+ term: React.PropTypes.string,
+ useMilitaryTime: React.PropTypes.bool.isRequired
};