mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Introduce new UI and behavior for playing audio attachments in conversations. Previously, playback stopped unexpectedly during window resizes and scrolling through the messages due to the row height recomputation in `react-virtualized`. With this commit we introduce `<GlobalAudioContext/>` instance that wraps whole conversation and provides an `<audio/>` element that doesn't get re-rendered (or destroyed) whenever `react-virtualized` recomputes messages. The audio players (with a freshly designed UI) now share this global `<audio/>` instance and manage access to it using `audioPlayer.owner` state from the redux. New UI computes on the fly, caches, and displays waveforms for each audio attachment. Storybook had to be slightly modified to accomodate testing of Android bubbles by introducing the new knob for `authorColor`.
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
// Copyright 2020 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { actions as audioPlayer } from './ducks/audioPlayer';
|
|
import { actions as calling } from './ducks/calling';
|
|
import { actions as conversations } from './ducks/conversations';
|
|
import { actions as emojis } from './ducks/emojis';
|
|
import { actions as expiration } from './ducks/expiration';
|
|
import { actions as items } from './ducks/items';
|
|
import { actions as network } from './ducks/network';
|
|
import { actions as safetyNumber } from './ducks/safetyNumber';
|
|
import { actions as search } from './ducks/search';
|
|
import { actions as stickers } from './ducks/stickers';
|
|
import { actions as updates } from './ducks/updates';
|
|
import { actions as user } from './ducks/user';
|
|
|
|
export type ReduxActions = {
|
|
audioPlayer: typeof audioPlayer;
|
|
calling: typeof calling;
|
|
conversations: typeof conversations;
|
|
emojis: typeof emojis;
|
|
expiration: typeof expiration;
|
|
items: typeof items;
|
|
network: typeof network;
|
|
safetyNumber: typeof safetyNumber;
|
|
search: typeof search;
|
|
stickers: typeof stickers;
|
|
updates: typeof updates;
|
|
user: typeof user;
|
|
};
|