WebDocument size field is not a reliable information,
it can be > 0 and != upload.WebFile size field, so just ignore it
and load all WebDocument files as files with unknown size.
Also replacing the Buy keyboard button with Receipt if the invoice
was payed already (like in mobile apps). This required to move the
inline markup apply before the media apply in message editing.
We load a WebDocument with an unknown size the same way as we load
normal photos with FileLocation, that doesn't contain size as well.
If the size information from WebDocument and upload.WebFile is
inconsistent we still fail to load the file.
New button type keyboardButtonBuy just shows a box with information.
WebDocument photo type is not supported yet, 'photo' is ignored.
Also HistoryMediaPtr is now implemented as a std::unique_ptr wrapper.
What has been done:
* Removed deprecated Encoding key
* Specified correct WM class for StartupWMClass key
* Fixed icon name
I also fixed restarting when language is changed and there is no Updater
Signed-off-by: Nicholas Guriev <guriev-ns@ya.ru> (github: mymedia2)
base::lambda_guarded may destroy the lambda after the owner. In case
of SelfDestructionBox it lead to a dtor of a dangling object_ptr.
MTP::Sender destroys the lambda handlers together with itself.
Now group of Ui::Radiobutton instances share Ui::RadiobuttonGroup.
All value management is done through the group instance, not through
separate radio buttons. Also a template for groups over enums added.
Commit a1b53c660e introduced a regression which caused images that
were shown for sending confirmation as a file path + image not being
passed to FileLoadTask in _image field, they were passed in the
_information field instead. They were not sent in case the file path
was not existing at the moment of processing. If the file path does
not exist anymore read the image from _information and send it.
Use a python script to generate the list of sources to build.
Now we don't include moc_*.cpp files in build by default, instead
we list only non-empty ones.
If you change a header so that the corresponding moc_*.cpp changes
its emptyness you may need to gyp/refresh to apply this change.
This should speed up the build significantly on GCC.