procxx / kepka

Unofficial Telegram Desktop messaging app
https://procxx.github.io
Other
114 stars 29 forks source link

The Duplicating code... #28

Open leha-bot opened 6 years ago

leha-bot commented 6 years ago

The Duplicating code never changes...

We should clean at most all code duplications. Feel free to add URLs to duplicated code chunks.

leha-bot commented 6 years ago

CRC duplication (by @crackedmind)

https://github.com/procxx/tdesktop/blob/aca957595a0938345821994df85437b6fed574e2/Telegram/SourceFiles/core/utils.cpp#L387 https://github.com/procxx/tdesktop/blob/aca957595a0938345821994df85437b6fed574e2/Telegram/SourceFiles/codegen/emoji/generator.cpp#L127 https://github.com/procxx/tdesktop/blob/aca957595a0938345821994df85437b6fed574e2/Telegram/SourceFiles/codegen/style/generator.cpp#L44

leha-bot commented 6 years ago

Long UI controller duplication logic (by @crackedmind)

Stanislav Ershov, [05.12.17 22:05] https://github.com/procxx/tdesktop/blob/aca957595a0938345821994df85437b6fed574e2/Telegram/SourceFiles/ui/widgets/input_fields.cpp#L2155 https://github.com/procxx/tdesktop/blob/aca957595a0938345821994df85437b6fed574e2/Telegram/SourceFiles/ui/widgets/input_fields.cpp#L2895

berkus commented 6 years ago

media_player_cover.cpp media_player_widget.cpp media_clip_controller.cpp

all share the same code for bounding player positionMs

berkus commented 6 years ago

core/utils.cpp implements sha and md5 functions despite dependency on openssl libs

berkus commented 6 years ago

Search for case mtpc_messageEmpty - the code around it is repeated at least in 3 different files

leha-bot commented 6 years ago

Version string generating.

https://github.com/procxx/kepka/blob/6ffc8d3905447a788ef139bd41ecc20f3c5797f2/Telegram/SourceFiles/apiwrap.cpp#L68

https://github.com/procxx/kepka/blob/6ffc8d3905447a788ef139bd41ecc20f3c5797f2/Telegram/SourceFiles/window/window_main_menu.cpp#L70