Enlarge emoji in composer (#7602)

This commit is contained in:
Robin 2022-01-24 07:53:05 -05:00 committed by GitHub
parent b5d11336f7
commit 6806c2cdca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 128 additions and 42 deletions

View file

@ -199,7 +199,7 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
// this returns the amount of added/removed characters during the replace
// so the caret position can be adjusted.
return range.replace([partCreator.plain(data.unicode)]);
return range.replace([partCreator.emoji(data.unicode)]);
}
}
}
@ -831,7 +831,7 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
const caret = this.getCaret();
const position = model.positionForOffset(caret.offset, caret.atNodeEnd);
model.transform(() => {
const addedLen = model.insert([partCreator.plain(text)], position);
const addedLen = model.insert(partCreator.plainWithEmoji(text), position);
return model.positionForOffset(caret.offset + addedLen, true);
});
}