Calling: Show call event summaries in left pane

This commit is contained in:
Scott Nonnenberg 2020-08-12 16:52:34 -07:00 committed by GitHub
parent 474d1694ed
commit eb44e2fc6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View file

@ -1000,6 +1000,12 @@
if (this.get('sticker')) {
return i18n('message--getNotificationText--stickers');
}
if (this.isCallHistory()) {
return window.Signal.Components.getCallingNotificationText(
this.get('callHistoryDetails'),
window.i18n
);
}
if (this.isExpirationTimerUpdate()) {
const { expireTimer } = this.get('expirationTimerUpdate');
if (!expireTimer) {

View file

@ -49,6 +49,9 @@ const {
const {
StagedLinkPreview,
} = require('../../ts/components/conversation/StagedLinkPreview');
const {
getCallingNotificationText,
} = require('../../ts/components/conversation/CallingNotification');
// State
const { createTimeline } = require('../../ts/state/roots/createTimeline');
@ -278,6 +281,7 @@ exports.setup = (options = {}) => {
ContactListItem,
ConversationHeader,
Emojify,
getCallingNotificationText,
Lightbox,
LightboxGallery,
MediaGallery,

View file

@ -15,7 +15,7 @@ type PropsHousekeeping = {
type Props = PropsData & PropsHousekeeping;
function getMessage(
export function getCallingNotificationText(
callHistoryDetails: CallHistoryDetailsType,
i18n: LocalizerType
): string {
@ -76,7 +76,7 @@ export const CallingNotification = (props: Props): JSX.Element | null => {
className={`module-message-calling--notification module-message-calling--${callType}`}
>
<div className={`module-message-calling--${callType}__icon`} />
{getMessage(callHistoryDetails, i18n)}
{getCallingNotificationText(callHistoryDetails, i18n)}
<div>
<Timestamp
i18n={i18n}