Better emoji support in linkify/previews
This commit is contained in:
parent
65ad608aa7
commit
773aa9af19
15 changed files with 337 additions and 260 deletions
|
@ -3,15 +3,21 @@
|
|||
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { assert } from '../../util/assert';
|
||||
import { getDomain } from '../../types/LinkPreview';
|
||||
|
||||
import { StateType } from '../reducer';
|
||||
|
||||
export const getLinkPreview = createSelector(
|
||||
({ linkPreviews }: StateType) => linkPreviews.linkPreview,
|
||||
linkPreview => {
|
||||
if (linkPreview) {
|
||||
const domain = getDomain(linkPreview.url);
|
||||
assert(domain !== undefined, "Domain of linkPreview can't be undefined");
|
||||
|
||||
return {
|
||||
...linkPreview,
|
||||
domain: window.Signal.LinkPreviews.getDomain(linkPreview.url),
|
||||
domain,
|
||||
isLoaded: true,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import {
|
|||
import { PropsType as ProfileChangeNotificationPropsType } from '../../components/conversation/ProfileChangeNotification';
|
||||
import { QuotedAttachmentType } from '../../components/conversation/Quote';
|
||||
|
||||
import { getDomain, isStickerPack } from '../../../js/modules/link_previews';
|
||||
import { getDomain, isStickerPack } from '../../types/LinkPreview';
|
||||
|
||||
import { ContactType, contactSelector } from '../../types/Contact';
|
||||
import { BodyRangesType } from '../../types/Util';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue