* MM-11198: avoid duplicate keys in date lines Ensure each dateline rendered as part of search, recent mentions, or flagged post list has a unique key, even if the same date itself appears multiple times. * update post_list.test.js to actually test date boundaries, relying on TZ=utc export in package.json * unit test makePreparePostIdsForSearchPosts * fix eslint issues * try TZ=GMT * encode date lines using timestamps instead This requires a few extra changes to the post list proper, but largely simplifies things anyway.
6 lines
244 B
JavaScript
6 lines
244 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {DATE_LINE} from 'app/selectors/post_list';
|
|
|
|
export const isDateLine = (dateString) => dateString.indexOf(DATE_LINE) === 0;
|