Tdesktop: [Enhancement] "Replace emoji" should replace emoji without hyphen dashes :)

Created on 9 Dec 2014  Â·  23Comments  Â·  Source: telegramdesktop/tdesktop

I don't add the hyphen to the smiley text :) to make it :-). Telegram Desktop currently only replaces the second one, but I would like it to replace the first one too.

I would love to make this change myself but I might break something not knowing anything more than basics of C++ and not knowing even the basics of Objective-C++. But I did some searches, and looks like you only need to copy-paste-reindent a bunch of lines here:

Add support:

Related issue: #116

_Sidenote:_ _The findEmoji method looks like a maintenance nightmare... isn't there a better way, like some sort of a hash map with key-value pairs?_

enhancement

Most helpful comment

I've followed the various chains which this is attached to, and either the integrations are not currently live, or not working, because this is still an issue as of today.
All the linked issues are closed, as far as I can see, with the exception of #780 which does not strictly solve it, but shows that it appears to be "by design" that shorthand "nose-less" emojis are not replaced.

There is an option to enable emoji auto-conversion, is it not possible to have a secondary array of auto-convert emojis, which includes the "nose-less" versions as well as the longer versions?

All 23 comments

:+1: because almost every other chat program I've used that does this doesn't require the hyphen nose.

Also, I totally agree that a hash/dictionary of some kind would probably be a much better way to implement this.

Sidenote: The ability to choose whether we see the iOS or Android emoji set would be awesome, but I'm sure that's extremely low priority. :wink:

Yeah the current implementation is a dirty hack, but to change it to a hash/dictionary there must be some way to deal with keys of variable lengths.

About your sidenote, this project is for the desktop app. I don't think I would want to see a particular brand of mobile emoji :smile:

@ADTC Oh I know this is the desktop app haha.
Am I crazy, or are the default emoji used in Telegram right now (including the desktop app) the same as the ones iOS uses?
That's the only reason I mentioned it.
That said, desktop app or not, I still don't see anything wrong with having a toggle in the settings to choose which you prefer. :smile:

I don't know man, but to me it looks like the exact set of emoji used in WhatsApp. I'm not sure if the set of emoji that WhatsApp uses on its Android client is actually borrowed from iOS... _is it?_

Telegram Desktop:
Telegram Desktop Emots

WhatsApp Android:
WhatsApp Android Emots

http://emojipedia.org/apple-emoji-list/

Certainly looks like it!
So it looks like use of that emoji set is just decently widespread, that's all.
I'd still love support for the Android emoji at some point, but like I said, low priority.

I had no clue that WhatsApp Android is using Apple emoji. I thought it's WhatsApp's own (since I never saw them anywhere else before). I love them and how they look. To be honest, I don't like Android emoji.. they look crap (unless you can show me pics of them looking awesome) :smile:

Yea haha.
Lucky for you I wasn't asking for mandatory Android emoji.
You can keep your damned iOS/WhatsApp emoji as long as you'd like even they fulfilled my wish! :wink:

Also, just fyi there's a pull request that (partially?) handles nose-less smilies.
Linked to it above.

Wait, if we have that 2D array map replaces[] in Telegram/SourceFiles/_other/genemoji.cpp, why do we still have the mess that is findEmoji in Telegram/SourceFiles/gui/emoji_config.cpp? Which one is actually used?

After studying the code, I now understand that Telegram/SourceFiles/gui/emoji_config.cpp is actually an automatically generated source file, and Telegram/SourceFiles/_other/genemoji.cpp is the C++ program that generates this.

So we don't need to modify findEmoji, we only need to add the new mappings to replaces[] (as bjaskj did) and re-generate the emoji_config.cpp source file. Is that right?

Also I noticed that there's another replaces[] 2D array in Telegram/SourceFiles/boxes/emojibox.cpp. I think this is related to the _"List of supported emojis"_ box shown in _Settings_ (when _View list_ is clicked). We should make sure this list is complete.

I'd like to add to the discussion by suggesting that we not only add new mappings but the ability to and and remove new mappings.

@SharpMelon How would it be helpful to let the user configure mappings? :)

@ADTC I use emojis other than those currently available for automatic replacement.

| Emoji | Value |
| --- | --- |
| :smile: | :) |
| :sparkles: | * |
| :expressionless: | :l |
| :purple_heart: | <3 |

Surely I may be one of few with such a need.

Is there any way to customize the list of replacements?

Hello everyone , i can not find the directory : Telegram/SourceFiles/... .
can u help me?!

@auchri Thank you ^_^ , are telegram sourcefiles stored in my computer too?
i mean i would like to access those files and modify them if possible, but i can't find them ...

btw I'm new to programming and i just know basic C language.

@S4JJ4D no :) That folder contains the source files, which are compiled to the binary, which is on your computer

@auchri . when i type ":-)" in telegram it automatically changes to a specific emoji, all i want is to replace ":-)" with ":)" . is there any possible way to do that?!

there is a directory in the attached photo : /Users/antanubis/Tbuild/tdesktop/Telegram/... and as u see there is an cpp file in there, but this directory does not exist in my computer.
screen shot 2015-09-18 at 1 57 31 pm

See #780

I've followed the various chains which this is attached to, and either the integrations are not currently live, or not working, because this is still an issue as of today.
All the linked issues are closed, as far as I can see, with the exception of #780 which does not strictly solve it, but shows that it appears to be "by design" that shorthand "nose-less" emojis are not replaced.

There is an option to enable emoji auto-conversion, is it not possible to have a secondary array of auto-convert emojis, which includes the "nose-less" versions as well as the longer versions?

เมื่อ อ. 29 ม.ค. 2562 เวลา 22:33 KilleR notifications@github.com เขียนว่า:

I've followed the various chains which this is attached to, and either the
integrations are not currently live, or not working, because this is still
an issue as of today.
All the linked issues are closed, as far as I can see, with the exception
of #780 https://github.com/telegramdesktop/tdesktop/issues/780 which
does not strictly solve it, but shows that it appears to be "by design"
that shorthand "nose-less" emojis are not replaced.

There is an option to enable emoji auto-conversion, is it not possible to
have a secondary array of auto-convert emojis, which includes the
"nose-less" versions as well as the longer versions?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/telegramdesktop/tdesktop/issues/307#issuecomment-458584632,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ArEZnwzg3oCEVnezbKmWixqXPpRB74lCks5vIGm9gaJpZM4DF7Mr
.

Just want to leave my +1 that this is still an issue as of today.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whywhyy picture whywhyy  Â·  3Comments

Yanrishatum picture Yanrishatum  Â·  3Comments

FunctionalHacker picture FunctionalHacker  Â·  3Comments

Liudvikas picture Liudvikas  Â·  3Comments

beppe9000 picture beppe9000  Â·  3Comments