Commit Graph

151 Commits

Author SHA1 Message Date
John Preston 46946c7323 Use correct SHA1_ functions.
Fixes #5103.
2018-08-27 14:36:26 +03:00
John Preston bdab477040 Update API scheme to layer 84. 2018-08-11 22:03:34 +03:00
John Preston 550c159ca8 Update API scheme to layer 83. 2018-08-04 23:11:04 +03:00
John Preston 90f4187ca9 Don't accept tg:// links in passport callbacks.
Fixes #5021.
2018-07-31 22:51:06 +03:00
Sven-Hendrik Haase 947204bb9d Add missing include to <gsl/gsl> (#4886) 2018-07-03 20:23:14 +03:00
Sven-Hendrik Haase f37f097dec Add include to <memory> (#4887) 2018-07-03 20:22:52 +03:00
John Preston 52f2f96f36 Closed beta 1.3.7.1: Fix Release build. 2018-06-22 01:01:45 +01:00
John Preston 2dc3ec955a Add downloaded files cache in export.
Also write downloaded photo paths.
2018-06-17 13:47:47 +01:00
John Preston 9d02e539c8 Update scheme for special export methods.
Export all saved contacts.
2018-06-16 20:48:38 +01:00
John Preston 83786ddeaf Export chat messages photos and documents.
Also rename .visit() with .match() in MTP types.
Also add base::match_method() and base::match() for base::variant.
Also add base::match() and .match() for base::optional_variant.
2018-06-14 01:09:48 +03:00
John Preston cec8114b99 Add simple files and contacts export.
Also move all API calls in export to Export::ApiWrap.
2018-06-12 01:02:05 +03:00
John Preston c587c011d2 Start data export in lib_export. 2018-06-12 01:02:04 +03:00
John Preston c2fa149ffd Replace InvokeQueued with on_main for has_weak_ptr. 2018-06-12 01:02:04 +03:00
John Preston 35659536c5 Fix first passcode unlock.
Fixes #4811.
2018-06-07 10:44:38 +03:00
John Preston 866c5e9b7b Request common notify settings when needed.
If user / group has default notify settings we need common user
or common group notify settings to display the badge properly.
2018-06-06 22:56:35 +03:00
John Preston c85fd368fe Possible fix of travis build. 2018-06-06 15:16:21 +03:00
John Preston 20b67ee000 Fix build for GCC. 2018-06-06 13:59:53 +03:00
John Preston d03d699331 Improve base::optional, add emplace(). 2018-06-05 21:51:05 +03:00
John Preston dd81f5d59f Replace base::lambda with shorter term.
base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
2018-06-04 18:38:27 +03:00
John Preston 5c0cc8a947 Append param to query or hash of callback_url. 2018-06-03 23:16:38 +03:00
John Preston ead31757d7 Submit passport results. 2018-06-03 23:16:36 +03:00
John Preston 1392e05ab1 Move all gsl::byte helpers to base/bytes module. 2018-06-03 23:16:34 +03:00
John Preston f633ead3ab First version of IdentityBox with encrypted data. 2018-06-03 23:16:33 +03:00
John Preston 07e8a2bd85 Initial layout of the passport authorization form. 2018-06-03 23:16:33 +03:00
John Preston a053384618 Fix mtproto-proxy working with domain names.
Also refactor a bit TcpConnection and HttpConnection classes.
2018-05-17 13:27:49 +03:00
John Preston 93f6d4b6e7 Support many config endpoints for one dc+params. 2018-05-05 21:55:37 +03:00
John Preston 7482025c10 Support work with different dcs on a single IP. 2018-05-05 21:55:37 +03:00
Marco Trevisan 9dc03c4f0f Linux ARM compile fixes (#4399)
This fixes errors when compiling in ARM
2018-03-09 23:48:47 +03:00
John Preston ebd4651ac2 Manage unread bar using HistoryView::Element-s. 2018-02-08 12:20:50 +03:00
John Preston 7425e80f05 Use HistoryMedia as view, add Data::Media. 2018-02-08 12:20:48 +03:00
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston af552fb4c0 Replace base/task_queue with crl. 2017-12-31 00:28:38 +03:00
John Preston 14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +04:00
John Preston 5bc47e5203 Move shareContact and readServerHistory to ApiWrap.
Also allow non-confirming contact info sharing to Saved Messages.
2017-12-07 17:43:05 +04:00
John Preston 007ab3b7b8 Fix crash in RSA public key wrapper. 2017-12-07 09:34:11 +04:00
Nicholas Guriev 93809ec404 Fix build against OpenSSL 1.1
Closes: #3196
2017-12-07 09:15:10 +04:00
John Preston 85b3d3f64d Display admin badges in supergroups.
Also prefer std containers to Qt and OrderedSet in data_peer.
2017-12-01 22:38:44 +04:00
John Preston 2432845df2 Optimize and rename base::weak_unique_ptr.
Rename base::enable_weak_from_this -> base::has_weak_ptr.
Rename base::weak_unique_ptr -> base::weak_ptr.
Rename base::make_weak_unique -> base::make_weak.
Rename base/weak_unique_ptr.h -> base/weak_ptr.h
2017-11-30 21:33:27 +04:00
John Preston d014b47958 Move Info::TopBarOverride to Info::TopBar.
This allows to improve animations in shared media items selection.
2017-11-27 15:43:57 +04:00
John Preston 67d4eb688a Reverse user and chat profile photos. 2017-11-23 13:58:12 +04:00
John Preston b337d54623 Use custom base::overload() helper. 2017-11-21 18:27:48 +04:00
John Preston 44e94bfbf5 Add workaround for macOS leaveEvent() bugs.
On macOS sometimes when mouse leaves the window we don't receive leaveEvent()
calls in the nested widgets, like buttons, only for the window itself.
2017-11-21 18:27:48 +04:00
John Preston d93c1ccbaa Improve compile time. 2017-11-21 14:20:52 +04:00
John Preston ac99318f34 Use ranges:: algorithms instead of base:: 2017-11-20 16:24:00 +04:00
John Preston 8ff0120642 Add EditPeerInfoBox without saving. 2017-11-16 07:59:10 +04:00
John Preston 86ad15612a Use Info::Controller for the whole info section. 2017-11-16 07:59:08 +04:00
John Preston c9152b0b3a Cache media search results until empty query. 2017-11-16 07:59:08 +04:00
John Preston eb2719fad1 Added search to files and links shared media. 2017-11-16 07:59:08 +04:00
John Preston a27edcad1c Extract SparseIdsList module from SharedMedia.
This way it can be reused in search results management.
2017-11-16 07:59:08 +04:00
John Preston f6ed3dff7f Rewrite base::lambda_guard, use only one pointer.
Support base::enable_weak_from_this for guarding, not only QObject,
in base::lambda_guard, in App::CallDelayed and in App::LambdaDelayed.

Allow only one guarding pointer, no places in code use more than one.
2017-11-16 07:59:08 +04:00
John Preston 101d4f6444 Use std::function for base::lambda implementation.
base::lambda becomes just std::function and base::lambda_once becomes
base::unique_function - a move-only wrapper around std::function.

This is required because Visual C++ 2017 15.4.1 has a compiler bug
with static member variables of class templates, they may collide.

The std::function uses inheritance and virtual functions instead of
custom vtables done by static members of class templates used in
custom base::lambda implementation, so they work fine.
2017-11-16 07:59:08 +04:00
John Preston b51f865c54 Save info members list state to memento. 2017-11-16 07:59:08 +04:00
John Preston 5b190c5098 Preserve TopBarOverride in Info WrapWidget.
Also support better selection in info shared media.
Also fix build for Xcode.
2017-11-16 07:59:07 +04:00
John Preston 54cc3e6315 Shared media multiple items selection. 2017-11-16 07:59:07 +04:00
John Preston fdd89d65ca Allow using custom comparators in flat_[map|set]. 2017-11-16 07:59:06 +04:00
John Preston ea0f6b9a12 Use 'if constexpr ()' instead of tag dispatch. 2017-11-16 07:59:05 +04:00
John Preston 80d9938e96 Support and use not type-erased consumers. 2017-11-16 07:59:05 +04:00
John Preston fddcdf359b Use not type-erased producers in code. 2017-11-16 07:59:05 +04:00
John Preston ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +04:00
John Preston 088d23d557 Start new Info section (profile + shared media). 2017-11-16 07:59:02 +04:00
John Preston fbcd5e2f1e Try to use const-ref better in rpl. 2017-11-16 07:59:02 +04:00
John Preston c302219f9e Use rpl in some widgets and effects. 2017-11-16 07:59:02 +04:00
John Preston 2363a6bd44 Add SharedMediaSlice to observe shared media.
Start testing / using it in MediaView.
2017-11-16 07:59:02 +04:00
John Preston 41ed2d1b84 New storage for shared media messages index. 2017-11-16 07:59:02 +04:00
John Preston b873fee1cf Use rvalue references in rpl next / error. 2017-11-16 07:59:01 +04:00
John Preston e70052e966 Add piping and on_next, on_error, on_done, start. 2017-11-16 07:59:01 +04:00
John Preston 101fdb1fba Add event_stream for events with many consumers. 2017-11-16 07:59:01 +04:00
John Preston ebe4bbbf0f Add core rpl::producer/consumer implementation. 2017-11-16 07:59:01 +04:00
visuve 08e3a54a58 Mark missing ctors deleted
- Satisfy the rule of five

Signed-off-by: Veli-Matti Visuri <veli-matti.visuri@cerescon.fi> (github: visuve)
2017-09-28 18:23:42 +03:00
John Preston 7ae1ef0a1a Migrate to VS2017. 2017-09-06 17:11:06 +03:00
John Preston c76389e126 Allow to use base::lambda independently. 2017-09-03 15:45:49 +03:00
John Preston df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston a1344e862a Add base/flags for bit flags on scoped enums. 2017-09-03 15:45:46 +03:00
John Preston 5faca8d4f6 Add Catch unittest framework and some tests. 2017-09-03 15:45:45 +03:00
John Preston 643bedd4cf Display faved stickers before recently used. 2017-08-30 19:15:48 +03:00
John Preston 25ffaaaa2d Replace t_assert() with Assert().
Also use this assertions for Expects(), Ensures() and Unexpected().
2017-08-30 19:15:42 +03:00
John Preston 782114d644 Add and use base::make_weak_unique() helper. 2017-08-30 19:15:28 +03:00
John Preston f7359093b4 Replace ContactsBox with PeerListBox in two cases.
- View contacts list in PeerListBox.
- Add participants when creating group / channel in PeerListBox.
2017-08-30 19:15:27 +03:00
John Preston 95af8da66a Call correct destructor in base::Observable.
base::Subscription::Node doesn't have a virtual destructor.
2017-08-30 19:15:23 +03:00
John Preston bca444b92e Add base::optional as a wrapper of base::variant. 2017-08-30 19:15:21 +03:00
John Preston ae1dacb7d7 Add base/algorithm for range-based algorithms. 2017-08-30 19:15:21 +03:00
John Preston e209737b1a Display and follow unread mentions in history. 2017-08-30 19:15:13 +03:00
John Preston 1207ddb2ea Add flat_map and flat_set using std::deque. 2017-08-25 14:39:31 +03:00
John Preston 7f5a91d2bb Allow to hide empty megagroup sticker set. 2017-08-25 14:39:24 +03:00
John Preston a143505fd6 Remove lambda_slot() and lambda_slot_once(). 2017-08-25 14:39:15 +03:00
John Preston 9bd89121e8 Replace self-destruct media service messages text.
Also support runtime components with align up to std::max_align_t.
2017-07-23 12:34:42 +03:00
John Preston 5d0e89db5d Switch to the server side changelogs. 2017-06-29 11:40:00 +03:00
John Preston b94099e25b Realtime UI translation in all fields and buttons. 2017-06-29 11:39:51 +03:00
John Preston f5dfeb0c50 Support cloud languages list and switching.
Add Lang::Current().updated() observable for retranslating the UI.
2017-06-29 11:39:43 +03:00
John Preston 0557eeddbd Switch base::TaskQueue to Qt sync primitives.
std::mutex in the current build environment is not supported
by Windows XP, I guess because Ninja uses v140 platform toolset.
2017-05-11 17:21:43 +03:00
John Preston 530a385d4e Add sound override support by codes in Settings. 2017-05-09 23:46:40 +03:00
John Preston 622fbdb64b Fix BN_div/mod_word() usage. 2017-05-09 23:46:37 +03:00
John Preston 299dc3fc96 Reuse call panel if current call is in Busy state. 2017-05-09 23:46:33 +03:00
John Preston f6eb2c5205 Add call top bar above the media player. 2017-05-09 23:46:18 +03:00
John Preston b267957abe Apply all MTP Key generation checks to calls.
Also move all OpenSSL BN_* calls to base/openssl_help header.
2017-05-09 23:46:16 +03:00
John Preston 4925af69e2 Add Calls::Panel and handle incoming calls. 2017-05-09 23:46:15 +03:00
John Preston d18164bc51 Add Calls::Instance. Add libtgvoip as a dependency.
Also move all submodules to Telegram/ThirdParty.
2017-05-09 23:46:08 +03:00
John Preston cd3c5e4ade Fix build in GCC.
GCC doesn't allow using scoped enums in bitfields without warnings.
So we use "unsigned" bitfield and a couple of get/set methods.
2017-04-08 14:25:54 +03:00
John Preston 34ab04cbe6 Add lambda-based checked timers.
Also ApiWrap is now not a QObject.
2017-04-07 18:13:21 +03:00
John Preston 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00