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')) { if (this.get('sticker')) {
return i18n('message--getNotificationText--stickers'); return i18n('message--getNotificationText--stickers');
} }
if (this.isCallHistory()) {
return window.Signal.Components.getCallingNotificationText(
this.get('callHistoryDetails'),
window.i18n
);
}
if (this.isExpirationTimerUpdate()) { if (this.isExpirationTimerUpdate()) {
const { expireTimer } = this.get('expirationTimerUpdate'); const { expireTimer } = this.get('expirationTimerUpdate');
if (!expireTimer) { if (!expireTimer) {

View file

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

View file

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