If some RPC responses and MTP updates are received together a fake
requestId in the negative range was used and that way updates were
processed before responses.
That could lead to an incorrect "out" message flag when sending
messages to supergroups, because a broadcast update about the new
message without "out" flag was handled before the request response.
Now a separate response map and updates list are used and responses
are handled always before the updates.
It seems that heavy using std::shared_ptr and std::make_shared
like it was before completely kills the compilation time.
Also HistoryItem::_create now uses perfect forwarding.
Currently the build without implicitly included precompiled header
is not supported anyway (because Qt MOC source files do not include
stdafx.h, they include plain headers).
So when we decide to support building without implicitly included
precompiled headers we'll have to fix all the headers anyway.
Now you can type "endpoints" in Settings and choose a file with
a complete set of dc_options that will be used instead of built-in
or received through mtproto config till the end of current session.
Some major platform-dependent file operations refactoring.
All methods like "open file", "open file with", "show in folder"
were moved to core/file_utilities module with platform-dependent
backends. All methods interacting with DesktopServices made async.
Special FileLoader destructor crash added to find the code path
leading to crashes that could be observed through the reports.
Looks like progress() signal handlers enter event loop somehow.
Now base::lambda can be copied and can wrap any immutable lambda.
For mutable lambdas there is base::lambda_once (which you're
supposed to call only once to pass data through lambda captures,
for example by using std::unique_ptr). Generally base::lambda is
passed by value and base::lambda_once is passed by rvalue reference.
Some of MTP::Instance::Private fields access _instance in
destructors. All that cleanup should be performed before the
Instance::~Instance() (which invalidates _private) is called.
If we start logging in and we know, that some of the authorization
keys were read from the hard drive, not generated, we destroy all
the existing authorization keys and start generating new keys.