Commit Graph

571 Commits

Author SHA1 Message Date
John Preston
83538675ce Move a lot of settings to Core::Settings. 2020-06-23 21:53:42 +04:00
John Preston
4d6cc58f0d Move session settings to main_session_settings. 2020-06-23 21:53:42 +04:00
John Preston
357caf8007 Keep separate MTP::Config's for separate accounts. 2020-06-23 21:53:41 +04:00
John Preston
6fc5e22882 Allow several accounts in Core::App. 2020-06-23 21:53:40 +04:00
John Preston
f450f81215 Remove non-UI calls to App::main. 2020-06-23 21:53:40 +04:00
John Preston
3c4e959468 Replace observer_peer with rpl interface. 2020-06-23 21:53:40 +04:00
John Preston
0ad7dcaef9 Remove MTP::MainInstance() global access point. 2020-06-23 21:53:40 +04:00
John Preston
ee43027bea Remove some usages of App::main(). 2020-06-23 21:53:39 +04:00
John Preston
ea86433be5 Remove some activeAccount() calls. 2020-06-23 21:53:39 +04:00
John Preston
598fb67cdf Remove Session::Exists() global access point. 2020-06-23 21:53:39 +04:00
John Preston
5f8d22f1f2 Remove Auth() global access point. 2020-06-23 21:53:39 +04:00
John Preston
ad4afe9293 Move session data localstorage -> storage_account. 2020-06-23 21:53:39 +04:00
John Preston
fc174f742a Move stickers code to Data::Stickers class. 2020-06-23 21:53:38 +04:00
John Preston
4b354b0928 Use Main::Session in download/upload. 2020-06-23 21:53:38 +04:00
John Preston
3878a1b212 Remove some more Auth() calls. 2020-06-23 21:53:38 +04:00
John Preston
c868cd6036 Update lib_ui. 2020-06-04 10:53:59 +04:00
John Preston
f4cd84c313 Fix crash in stickers. 2020-06-01 18:09:34 +04:00
John Preston
6660338ccc Fix crash in sticker sets without a thumbnail. 2020-06-01 18:09:34 +04:00
John Preston
4695ebae6e Fix crash in sticker set parsing. 2020-06-01 18:09:34 +04:00
John Preston
36fbdfb380 Simplify Image, remove ImageSource. 2020-06-01 18:09:33 +04:00
John Preston
d0c78eaddd Leave only one image source type. 2020-06-01 18:09:33 +04:00
John Preston
6513422e40 Remove legacy image-related code. 2020-06-01 18:09:33 +04:00
John Preston
f066e0f05a Use Data::CloudImage for userpics. 2020-06-01 18:09:33 +04:00
John Preston
249f7813c1 Don't hold session pointer in Data::CloudImage. 2020-06-01 18:09:33 +04:00
John Preston
ae9ed820ee Fix sticker set icons display. 2020-06-01 18:09:33 +04:00
John Preston
803593cd8d Change Stickers::Set from value to object type. 2020-06-01 18:09:33 +04:00
John Preston
7ad660a0e7 Allow photos not have some of the thumbnails. 2020-06-01 18:09:32 +04:00
John Preston
e27d2bc2d5 Move photo data to Data::PhotoMedia. 2020-06-01 18:09:32 +04:00
John Preston
24fed8105c Fix stickers panel on Retina screens. 2020-06-01 18:09:32 +04:00
John Preston
0834920db8 Fix sending of video-thumbed GIFs from panel. 2020-06-01 18:09:32 +04:00
John Preston
c967a72dcb Save frame in GIFs panel. 2020-06-01 18:09:31 +04:00
John Preston
7d386b164b Save a frame in stickers panel. 2020-06-01 18:09:31 +04:00
John Preston
9725d4272e Clear DocumentMedia in sticker panel. 2020-06-01 18:09:31 +04:00
John Preston
eb75859dc0 Cache last frame of stickers panel footer icons. 2020-06-01 18:09:31 +04:00
John Preston
fb322b5fc5 Use empty Storage::Cache::Key as nullopt. 2020-06-01 18:09:31 +04:00
John Preston
cbb9657044 Fix download task finalizing. 2020-06-01 18:09:30 +04:00
John Preston
3797753d16 Support different location types for thumbnails. 2020-06-01 18:09:30 +04:00
John Preston
956c3af0ae Start DocumentData::thumbnail move to DocumentMedia. 2020-06-01 18:09:30 +04:00
John Preston
1e9c79ca85 Move automaticLoad() to DocumentMedia. 2020-06-01 18:09:30 +04:00
John Preston
40f12a2584 Keep document byte data only in DocumentMedia. 2020-06-01 18:09:30 +04:00
John Preston
97bab388ea Use rpl for file download progress notifications. 2020-06-01 18:09:30 +04:00
John Preston
bf616036b3 Check loaded status through DocumentMedia if possible. 2020-06-01 18:09:30 +04:00
John Preston
33f4946242 Start using document bytes from DocumentMedia. 2020-06-01 18:09:30 +04:00
John Preston
70c79eb6bd Move sticker image to DocumentMedia. 2020-06-01 18:09:30 +04:00
John Preston
bdd3c51ab8 Move inline thumbnail image to DocumentMedia. 2020-06-01 18:09:30 +04:00
John Preston
c7878f9d21 Pause by-emoji stickers on sticker preview. 2020-05-12 12:18:31 +04:00
John Preston
36997f084a Automatically load and apply old emoji set by id. 2020-05-08 11:22:22 +04:00
John Preston
942fcb9aae Add new emoji sets file ids. 2020-05-07 19:05:57 +04:00
John Preston
dd78052f92 Use new toast style structure. 2020-04-30 11:35:01 +04:00
John Preston
aabc8173c3 Use similar margins in all controls. 2020-04-30 11:35:01 +04:00
John Preston
46f3cf3395 Load more official sets while scrolling. 2020-04-21 18:55:35 +04:00
John Preston
dfc0491524 Improve trending stickers layout and position. 2020-04-21 18:55:35 +04:00
John Preston
abfd3ad1b9 Use built-in zero-value dice animations. 2020-04-21 18:55:35 +04:00
John Preston
e118972d5c Support generic dice media display. 2020-04-21 18:55:35 +04:00
John Preston
3e2f4bed50 Update scheme to layer 102.
Support different dice-like media.
2020-04-21 18:55:34 +04:00
John Preston
f5aba5a907 Fix build with new lib_ui commits. 2020-04-13 15:26:09 +04:00
23rd
15db48b0cc Added application name as exception word for spell checker. 2020-03-27 20:36:07 +04:00
John Preston
4f718aeead Add filter icons to Settings -> Folders. 2020-03-27 20:36:05 +04:00
John Preston
ba6373a0ae Fix filter icon panel wrong hiding. 2020-03-27 20:36:04 +04:00
John Preston
b8c11f3d8c Manage filters: delete, add suggested. 2020-03-27 20:36:02 +04:00
John Preston
c83e297554 Implement dice media display. 2020-03-27 20:36:02 +04:00
John Preston
7b51383b3b Force animation unload in inline results.
Fixes #7335.
2020-03-16 17:41:35 +04:00
John Preston
1492571232 Fix members dropdown and mention autocomplete.
Fixes #7345.
2020-03-13 23:14:23 +04:00
23rd
a0584ea7a1 Moved all destruction calls of DictLoader to main thread. 2020-02-27 15:18:00 +04:00
23rd
0ca0930066 Updated context menu for spellchecker. 2020-02-24 18:48:33 +03:00
23rd
8734ebe4c4 Added auto download of new dictionary when input locale is changed. 2020-02-24 18:48:33 +03:00
23rd
bc6e1e7a0d Added new setting for automatic dictionaries download. 2020-02-24 18:48:33 +03:00
23rd
bb8aead078 Added sequential background dictionary loader.
- Moved the Loader from the dictionaries manager to the spellchecker
 common space as a DictLoader.
2020-02-24 18:48:33 +03:00
23rd
9daf362df6 Added label with state to "Manage dictionaries" button. 2020-02-24 18:48:33 +03:00
23rd
a0f995b134 Added ability to remove dictionary from context menu. 2020-02-24 18:48:33 +03:00
23rd
9d1b93fe50 Moved spellchecker work from message_field to Spellchecker::Start. 2020-02-24 18:48:33 +03:00
23rd
783269e256 Removed unnecessary Sets() function. 2020-02-24 18:48:33 +03:00
23rd
f598bf0b42 Replaced fake dictionary ids with real values. 2020-02-24 18:48:33 +03:00
23rd
f377ac54fd Slightly refactored spellchecker_common.cpp.
- Moved LocaleFromLangId to lib_spellcheck.
2020-02-24 18:48:33 +03:00
23rd
9d98682089 Removed unnecessary includes from emoji sets and dictionaries managers. 2020-02-24 18:48:33 +03:00
23rd
efdf5f1767 Moved producer of state description to CloudBlob. 2020-02-24 18:48:33 +03:00
23rd
8ca0b614d7 Moved loader of emoji sets and dictionaries to CloudBlob. 2020-02-24 18:48:33 +03:00
23rd
704dcc8d65 Moved emoji sets and dictionaries loader states to CloudBlob.
- Moved CloudBlob to second namespace.
2020-02-24 18:48:33 +03:00
23rd
9f4d05b04c Moved emoji sets from lib_ui. Added parent struct to storage_cloud_blob. 2020-02-24 18:48:33 +03:00
23rd
08cd7450ff Added storage/storage_cloud_blob.
- This file is needed to store same code parts related
 to management of dictionaries and emoji sets.
 - Moved extracting of zip files to storage_cloud_blob.
2020-02-24 18:48:33 +03:00
23rd
4b684a4926 Added spellchecker helper for common purposes. 2020-02-24 18:48:33 +03:00
23rd
26a45885ff Added updating of spell highlighter when enabled languages are changed. 2020-02-24 18:48:33 +03:00
John Preston
3c5f8d08ad Fix radial animations in emoji download. 2020-02-11 14:12:42 +04:00
John Preston
74d848311b Replace str_const with base::const_string. 2020-01-29 12:47:50 +03:00
John Preston
bdfa080701 Fix build for Windows. 2020-01-23 10:09:34 +03:00
23rd
465a42a825 Added ability to customize shortcuts for sending messages. 2020-01-23 10:09:34 +03:00
23rd
7d519990b2 Added ability to customize shortcuts for silent or scheduled messages. 2020-01-23 10:09:34 +03:00
23rd
c08b2ae3df Added ability to schedule messages to be sent when user comes online.
Pro tip: Hold Ctrl key to send a silent scheduled message!
2020-01-23 10:09:33 +03:00
23rd
b4fbff0b6c Fixed build for Windows with c++latest. 2020-01-21 20:29:14 +03:00
John Preston
f2a92f2b02 Check if app is active before showing a tooltip.
Fixes #6885, fixes #6895.
2019-12-31 16:48:44 +03:00
23rd
e5682a9b25 Fixed Spelling Highlighter creation on unsupported platforms. 2019-12-30 16:02:15 +03:00
John Preston
c7836be614 In emoji suggestions match only full strings. 2019-12-10 11:17:27 +03:00
John Preston
c301be3826 Fix GIFs and animated stickers freeze. 2019-12-09 09:37:02 +03:00
John Preston
ee94e78533 All mtproto downloads using DownloadMtprotoTask. 2019-12-05 11:32:33 +03:00
John Preston
e943264823 Pass MTP::Instance to MTP::Sender. 2019-11-29 15:36:05 +03:00
Nicholas Guriev
793862bee6 Fix -Wredundant-move and -Wdeprecated-copy warnings (#6663)
* Do not move result at end of function

This makes GCC 9.1.2 happy with the active -Wredundant-move warning.
Indeed, such moving of local variables or local arguments before
returning is unnecessary and prevents the compiler from copy elision
optimization.
2019-11-12 18:15:34 +03:00
23rd
16d06527be Updated lib_spellcheck.
- Fixed #6756.
2019-11-06 15:45:03 +03:00
John Preston
d1e2fec760 Fix crash in destructor of spellchecked input field. 2019-11-05 17:03:48 +03:00
John Preston
1eb62579e2 Support building OS X 10.10/10.11 version. 2019-11-05 14:27:42 +03:00
John Preston
88e0342e02 Update to the latest submodules. 2019-11-05 14:27:42 +03:00
John Preston
d63e50944a Update submodules to the latest spellcheck. 2019-11-05 13:23:56 +03:00
23rd
aa9dc2bee2 Added phrases for spellchecker. 2019-10-20 21:11:38 +04:00
23rd
4be178c75f Added SpellingHighlighter to InputField in HistoryWidget and some boxes. 2019-10-20 21:11:38 +04:00
John Preston
30a1bd7ba2 Use base::call_delayed. 2019-10-19 12:27:56 +04:00
John Preston
f677b116f9 Use install_base_filter for lib_base. 2019-10-19 12:27:56 +04:00
John Preston
a6c84c36c0 Use layers and boxes from lib_ui. 2019-10-19 12:27:52 +04:00
John Preston
246c45ce0e Use lib_ui from submodule. 2019-10-19 12:27:28 +04:00
John Preston
55d5f6e03d Fix possible crash in emoji suggestions.
Fixes #6652, fixes #6654.
2019-10-07 12:35:49 +03:00
John Preston
606a90a4ac Fix crash in emoji suggestions.
Fixes #6636.
2019-10-03 12:13:41 +03:00
John Preston
ecfe1dacb2 Version 1.8.12: Fix build for Xcode. 2019-10-02 12:54:29 +03:00
Jiachen YANG
56aab1aa07 explicitly specify the upper bound in ranges::view::ints 2019-10-02 11:52:55 +03:00
Jiachen YANG
9d850b71e7 be compatible with range-v3 0.9.x/1.0 branch
This made 2 changes to the current code base to be compatible with higher versions of range-v3 library.
1. ranges::iterator_range was renamed to subrange, see https://github.com/ericniebler/range-v3/issues/766
2. PercentCounterItem need an operator== for ranges::sort for some reason
2019-10-02 11:52:55 +03:00
John Preston
849deb57e2 Move many widget classes to lib_ui. 2019-10-01 23:59:46 +03:00
John Preston
dda587a2fc Move QtConnectionOwner to base/qt_connection. 2019-10-01 23:59:46 +03:00
John Preston
c057f28425 Move standard buttons to lib_ui. 2019-10-01 23:59:46 +03:00
John Preston
c5845f17ae Remove twidget header. 2019-10-01 23:59:46 +03:00
John Preston
e2f54eb3e9 Move some style code to lib_ui. 2019-10-01 23:59:46 +03:00
John Preston
0c713a930a Remove app.h / facades.h from precompiled header. 2019-10-01 23:59:46 +03:00
John Preston
04b9d4bdb5 Fix animated emoji reloading. 2019-09-11 14:00:18 +03:00
John Preston
76f0abecfd Show sticker set on Ctrl+Click in stickers list. 2019-09-10 00:48:34 +03:00
John Preston
037b936613 Fix possible crash with emoji load failure. 2019-09-09 10:45:18 +03:00
John Preston
4951eeac98 Allow creating desktop part of multi-theme. 2019-09-06 19:31:07 +03:00
John Preston
6343221d7b Remove many includes from stdafx.pch. 2019-09-06 19:31:07 +03:00
John Preston
66bf48e21e Remove 'Send without sound' in Saved messages. 2019-08-31 14:43:19 +03:00
John Preston
87addd41b1 Add new phrases for reminders. 2019-08-29 10:01:28 +03:00
John Preston
ef7087348a Allow to schedule created polls. 2019-08-27 19:10:37 +03:00
John Preston
3e895d0e85 Make tabbed selector working in scheduled section. 2019-08-27 19:10:37 +03:00
John Preston
385a7eb00d Start scheduled compose controls. 2019-08-27 19:10:37 +03:00
John Preston
caef7dde24 Bundle silent and scheduled to Api::SendOptions. 2019-08-27 19:10:37 +03:00
John Preston
bc83df9d7f Repaint skin-toned animated emoji. 2019-08-09 11:51:33 +01:00
John Preston
4bad642190 Remove some more Auth() calls. 2019-08-09 11:50:49 +01:00
John Preston
57cdef4e6b Improve large emoji outline. 2019-08-09 11:50:49 +01:00
John Preston
1b1b1780db Reuse global emoji large images. 2019-08-09 11:50:49 +01:00
John Preston
e479daca03 Use outlined large emoji. 2019-08-09 11:50:49 +01:00
John Preston
51d350c356 Fix stickers and emoji render. 2019-08-09 11:50:49 +01:00
John Preston
9da4bd671e Closed alpha version 1.7.15.4. 2019-08-09 11:50:49 +01:00
John Preston
d298953653 Add large emoji implementation. 2019-08-09 11:50:49 +01:00
John Preston
fd59147b8a Allow disabling animated emoji. 2019-08-09 11:50:49 +01:00
John Preston
93a52bb66e Move some settings from global to Session. 2019-08-09 11:50:49 +01:00
John Preston
7e4c9f98a6 Track all single-emoji messages. 2019-08-09 11:50:49 +01:00
John Preston
f7f797dd78 Initial animated emoji implementation. 2019-08-09 11:50:49 +01:00
John Preston
32e8ae2b9e Fix sticker suggestions by emoji.
Regression was introduced in 27f248645c.
2019-07-28 15:45:46 +02:00
John Preston
3f2cc01f48 Allow sending silent messages. 2019-07-27 17:19:04 +02:00
John Preston
bacaf805b5 Pass SessionNavigation to some boxes. 2019-07-25 20:55:11 +02:00
John Preston
ff44094ded Rename AuthSession to Main::Session. 2019-07-24 13:45:24 +02:00
John Preston
06982fdf04 Remove some calls to Auth(). 2019-07-24 13:13:51 +02:00
John Preston
9cf4cf6dca Move MTP::Instance to Main::Account. 2019-07-24 10:46:23 +02:00
John Preston
27f248645c Use correct animated sticker thumbnails size. 2019-07-24 08:02:20 +02:00
John Preston
873b77cf40 Use UserData::isBot where applicable. 2019-07-24 08:02:20 +02:00
John Preston
04bf24288a Show slowmode error messages. 2019-07-24 08:02:20 +02:00
23rd
633084ed9c Fixed position of already shown tabbed panel.
- Fixed #6301.
2019-07-18 12:09:53 +02:00
John Preston
c5df4db621 Fix possible race conditions in msgid(). 2019-07-15 16:00:30 +02:00
John Preston
4e52da91c7 Fix animation stopping in chat. 2019-07-05 19:47:40 +02:00
John Preston
198de85ce5 Limit to 30 FPS in small stickers. 2019-07-05 19:15:25 +02:00
John Preston
567bf60644 Use getters in MTP classes. 2019-07-05 16:23:07 +02:00
23rd
7c98f64cdb Slightly refactored display of media preview.
- Removed showMediaPreview from facades.
2019-07-04 16:28:58 +02:00
John Preston
2d62c9b083 Prefer animated stickers in suggestion by emoji. 2019-07-04 16:26:53 +02:00
John Preston
d228495550 Allow replacing emoji by Tab in support mode. 2019-07-04 13:26:39 +02:00
John Preston
dd38da7737 Allow markdown to intersect with previewed links. 2019-07-04 11:51:41 +02:00
John Preston
dd1bca1769 Remove profiling logs. 2019-07-02 22:40:10 +02:00
John Preston
0dd1b4eae6 Support animated stickers in suggestions. 2019-07-02 17:21:52 +02:00
John Preston
848ea16eef Support animated stickers in inline results. 2019-07-02 15:46:26 +02:00
John Preston
76630528f7 Show animated thumbnails in sets box. 2019-07-02 15:20:04 +02:00
John Preston
3b645422ff Implement animated stickerset thumbnails. 2019-07-02 14:43:17 +02:00
John Preston
db2d24ff32 Clear lottie on panel hide. 2019-07-01 17:57:40 +02:00
John Preston
37689affc5 Clear far enough animated sticker sets. 2019-07-01 17:57:39 +02:00
John Preston
5375e7958c Implement pause/unpause for Lottie::MultiPlayer. 2019-07-01 17:57:39 +02:00
John Preston
f6bfbbb805 Add some profiling logs to lottie player. 2019-07-01 17:57:39 +02:00
John Preston
53a3d0038c Fix build for Xcode. 2019-07-01 17:57:38 +02:00
John Preston
ad1816cb7c Use Lottie::MultiPlayer in StickersListWidget. 2019-07-01 17:57:38 +02:00
John Preston
cbffeca8d5 Extract some Lottie::Animation code to Lottie::Player. 2019-07-01 17:57:37 +02:00
John Preston
4a7b5a8e01 Fix caching for large sticker area. 2019-07-01 17:57:37 +02:00
John Preston
808583c5ae Store cached frames in media local cache. 2019-07-01 17:57:37 +02:00
John Preston
a026aec786 Trivial in-memory frame caching. 2019-07-01 17:57:35 +02:00
John Preston
10772f4ac5 Started Lottie::CacheState class. 2019-07-01 17:57:34 +02:00
John Preston
35bc2cc2a5 Prepare lottie animations caching. 2019-07-01 17:57:34 +02:00
John Preston
0d6ee3929d Show animated stickers in the panel. 2019-07-01 17:57:32 +02:00
John Preston
8f3f898c47 Show animated stickers in StickerSetBox. 2019-07-01 17:57:32 +02:00
John Preston
8741266819 Add support for Underline and Strike-through text. 2019-06-23 15:40:59 +02:00
23rd
c7526ae1cd Fixed title of recently used emoji in touchbar.
- Added "No found" title if sticker list is empty.
2019-06-22 22:13:06 +02:00
John Preston
4917ca7b32 Remove all legacy global namespace langs. 2019-06-21 11:06:52 +02:00
John Preston
87fc066e67 Use tr:: instead of lang(). 2019-06-21 11:06:51 +02:00
John Preston
a7c8feaecb Use tr:: instead of langFactory and __rich. 2019-06-21 11:06:50 +02:00
John Preston
d1d98c3bb1 Use tr:: instead of langFactory in box titles. 2019-06-21 11:06:50 +02:00
John Preston
8ed433cc01 Use tr:: instead of langFactory in input fields. 2019-06-21 11:06:49 +02:00
John Preston
ca7c50fbcd Remove pseudo-HTML from langpacks and Ui::Text::String. 2019-06-21 11:06:46 +02:00
John Preston
2162aa8df0 Rename Text to Ui::Text::String. 2019-06-21 11:06:46 +02:00
John Preston
e9677779b8 Show phone number only in the chat top bar. 2019-06-21 11:06:46 +02:00
John Preston
96acecc35b Remove newline in support mode message edit. 2019-06-08 18:19:20 +03:00
John Preston
f8d900d7fb Fix freezes in support mode message edit. 2019-06-08 18:19:20 +03:00
23rd
ae3fae44b2 Fix build on macOS. 2019-06-06 14:21:31 +03:00
John Preston
a547f80ae9 Rename Window::Controller to Window::SessionController. 2019-06-06 13:21:40 +03:00
John Preston
94c4ea6174 Access _authSession through activeAccount(). 2019-06-05 23:41:51 +03:00
John Preston
8c67a4b991 Strip auto-hashtag in support mode message editing. 2019-06-05 21:40:21 +03:00
John Preston
9c613fe2f7 Move system versions to platform/platform_info. 2019-06-04 14:23:14 +03:00
John Preston
2a96f358f6 Fix build in Xcode. 2019-05-27 15:56:33 +02:00
John Preston
2f1b029ec9 Don't suggest emoji on :[non-letter]. 2019-05-27 15:10:08 +02:00
John Preston
0eb975e679 Allow disabling first-word emoji suggestions. 2019-05-27 15:10:06 +02:00
John Preston
c4aac5fa0e Update API scheme to layer 100. 2019-05-27 15:09:06 +02:00
23rd
cf45b0d317 Added ability to send not loaded GIFs with Ctrl key. 2019-05-27 14:10:35 +02:00