Timeline: repair oldest/newest metrics if we fetch nothing
This commit is contained in:
parent
56ae4a41eb
commit
6832b8acca
47 changed files with 579 additions and 173 deletions
20
ts/state/selectors/items.ts
Normal file
20
ts/state/selectors/items.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { StateType } from '../reducer';
|
||||
import { ItemsStateType } from '../ducks/items';
|
||||
|
||||
export const getItems = (state: StateType): ItemsStateType => state.items;
|
||||
|
||||
export const getUserAgent = createSelector(
|
||||
getItems,
|
||||
(state: ItemsStateType): string => state.userAgent as string
|
||||
);
|
||||
|
||||
export const getPinnedConversationIds = createSelector(
|
||||
getItems,
|
||||
(state: ItemsStateType): Array<string> =>
|
||||
(state.pinnedConversationIds || []) as Array<string>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue