Refactor all emoji utility methods into window.Signal.Emoji

This commit is contained in:
Scott Nonnenberg 2018-05-18 12:00:46 -07:00
parent 32e2c6dcb5
commit a5416e42c4
14 changed files with 131 additions and 387 deletions

View file

@ -75,7 +75,6 @@
this.timeStampView.setElement(this.$('.last-timestamp'));
this.timeStampView.update();
emoji_util.parse(this.$('.name'));
if (lastMessage) {
if (this.bodyView) {

View file

@ -177,7 +177,6 @@
model: this.model,
});
emoji_util.parse(this.$('.conversation-name'));
this.window = options.window;
this.fileInput = new Whisper.FileInputView({
@ -1331,7 +1330,7 @@
}
const input = this.$messageField;
const message = this.replace_colons(input.val()).trim();
const message = window.Signal.Emoji.replaceColons(input.val()).trim();
try {
if (!message.length && !this.fileInput.hasFiles()) {

View file

@ -408,7 +408,6 @@
this.$el.addClass('control');
const content = this.$('.content');
content.text(this.model.getDescription());
emoji_util.parse(content);
} else {
this.$el.removeClass('control');
}