Visuals for embedded contacts as well as contact detail screen
This commit is contained in:
parent
3ea3e4e256
commit
41be7f126b
17 changed files with 1323 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { padStart, sample } from 'lodash';
|
||||
import libphonenumber from 'google-libphonenumber';
|
||||
|
||||
import _ from 'lodash';
|
||||
import moment from 'moment';
|
||||
|
@ -17,6 +18,7 @@ export { BackboneWrapper } from '../components/utility/BackboneWrapper';
|
|||
// Here we can make things inside Webpack available to Backbone views like preload.js.
|
||||
|
||||
import { Quote } from '../components/conversation/Quote';
|
||||
import { EmbeddedContact } from '../components/conversation/EmbeddedContact';
|
||||
import * as HTML from '../html';
|
||||
|
||||
import * as Attachment from '../../ts/types/Attachment';
|
||||
|
@ -130,6 +132,7 @@ parent.Signal.Types.MIME = MIME;
|
|||
parent.Signal.Types.Attachment = Attachment;
|
||||
parent.Signal.Components = {
|
||||
Quote,
|
||||
EmbeddedContact,
|
||||
};
|
||||
parent.Signal.Util = Util;
|
||||
parent.SignalService = SignalService;
|
||||
|
@ -194,6 +197,20 @@ group.contactCollection.add(CONTACTS[2]);
|
|||
export { COLORS, CONTACTS, me, group };
|
||||
|
||||
parent.textsecure.storage.user.getNumber = () => ourNumber;
|
||||
parent.textsecure.messaging = {
|
||||
getProfile: async (number: string): Promise<Boolean> => {
|
||||
if (parent.ConversationController.get(number)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
throw new Error('User does not have Signal account');
|
||||
},
|
||||
};
|
||||
|
||||
parent.libphonenumber = libphonenumber.PhoneNumberUtil.getInstance();
|
||||
parent.libphonenumber.PhoneNumberFormat = libphonenumber.PhoneNumberFormat;
|
||||
|
||||
parent.storage.put('regionCode', 'US');
|
||||
|
||||
// Telling Lodash to relinquish _ for use by underscore
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue