Voice notes mini-player
This commit is contained in:
parent
b5849f872a
commit
0e655ceeed
45 changed files with 1599 additions and 487 deletions
22
ts/state/smart/VoiceNotesPlaybackProvider.tsx
Normal file
22
ts/state/smart/VoiceNotesPlaybackProvider.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
import { VoiceNotesPlaybackProvider } from '../../components/VoiceNotesPlaybackContext';
|
||||
import type { StateType } from '../reducer';
|
||||
import { getSelectedConversationId } from '../selectors/conversations';
|
||||
import { isPaused } from '../selectors/audioPlayer';
|
||||
|
||||
const mapStateToProps = (state: StateType) => {
|
||||
return {
|
||||
conversationId: getSelectedConversationId(state),
|
||||
isPaused: isPaused(state),
|
||||
};
|
||||
};
|
||||
|
||||
const smart = connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
export const SmartVoiceNotesPlaybackProvider = smart(
|
||||
VoiceNotesPlaybackProvider
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue