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.
This will allow us to use C++14 library on all platforms.
Patches for macold versions got bigger and are now different for
crashpad and mini_chromium, so they were moved to a separate folder.
We use /SUBSYSTEM:Windows and 'MinimumRequiredVersion': '5.01' to
make our app work in Windows XP, but we use 'v140' toolset instead
of 'v140_xp' so that we have access to modern APIs like WRL.
Fix a regression introduced in 8d354382a4 which caused an overflow
in _parAnalysis access. We were resizing _parAnalysis array for a
line width without the pending newline character while we used it
for painting a line including the pending newline character. It was
not a problem before, when we were trimming them from the end of
the string, but it results in a buffer overflow and crashes in the
lastest versions. So now we just don't include the newline in the
painted string, so it has exactly the same size as _parAnalysis.
A regression was introduced in 1.0.12 version which led to wrong
activations of the main window: if a custom popup menu was shown
for the tray icon or a custom notification was clicked.
Also implement build defines for Windows
Set TELEGRAM_BUILD_DEFINES before calling gyp/refresh.bat
Fix#3000
Signed-off-by: Christoph <auer.chrisi@gmx.net>
When we hide window by 'x' title button or by cmd+w key we try to
deactivate the whole application (so some other app gets activated).
When we activate the application in any way we check if the main
window is hidden and if it is - we show it and activate it.
Sometimes the windows quiet hours registry key gets set even in
Windows 7 (or older) and we disable notifications though it has
nothing to do with real user settings. Check for 8.1 at least.
We should count emoji length correctly in cases we have a partial
match for a longer one, but not a full match. If we start reading
the next characters but don't find a full emoji there we need to
have a correct length of a previously found emoji saved already.
error: inconsistent deduction for 'auto': 'int' and then 'auto'
auto start = 0, end = list.size();
^~~~
Signed-off-by: Wouter van Kesteren <woutershep@gmail.com> (github: woutershep)