Commit graph

50 commits

Author SHA1 Message Date
John Preston
2e374e68c5 Fix working with layers.
Regression was introduced in df64c97.

New base::flags work correctly only if all mutually exclusive flag
values use mutually exclusive bits (a & b == 0 for exclusive (a, b)).

Closes #3856.
2017-09-03 22:49:33 +03:00
John Preston
df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston
c97227825f Send images as files if no way to send as photos.
Fixes #3710.
2017-08-30 19:15:44 +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
b3da99c302 Replace gsl::not_null<T*> with just not_null<T*>. 2017-08-30 19:15:41 +03:00
John Preston
e13ed9b909 Remove main()->peerUpdated and some other signals. 2017-08-30 19:15:36 +03:00
John Preston
f2801d4775 Fix possible crash in file download after error.
Regression was introduced in 2fa2fa41c5.

In file download failed handler we suggest to try to load the file
once again to the same location. After some changes we started to
forget filename before failed handler. That resulted in large files
loading to memory instead of hard drive.

Add a precondition in FileLoader to prevent such bugs in the future.
2017-08-30 19:15:34 +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
ab35829358 Remove App::app(), App::uploader(), App::api().
Also use Auth() instead of AuthSession::Current*().
2017-08-25 14:39:18 +03:00
John Preston
667eb288d7 Add faved stickers set loading and saving.
Also move stickers loading methods to ApiWrap.
2017-08-25 12:58:13 +03:00
John Preston
9d81ea59dd Attempt to fix an out of memory crash. 2017-08-01 21:14:43 +03:00
John Preston
80ee40eb18 Add debug info for out of memory crash. 2017-07-27 13:14:39 +03:00
John Preston
0e059ec788 Version 1.1.16: Add some debug info. 2017-07-26 17:56:01 +03:00
John Preston
2e0513a30f Check CDN file hashes. 2017-07-23 12:34:41 +03:00
John Preston
90311dbf24 Fix CDN file download. 2017-07-18 22:01:22 +03:00
John Preston
f316e3bd17 Add debug logs for window position and autoupdate. 2017-07-03 15:23:41 +03:00
John Preston
61659244b7 Add night mode switch to the main menu.
Also fix a bug with the default background applying.
2017-06-30 09:21:46 +03:00
John Preston
9e6f2a5d2e Remember connection type settings. 2017-06-30 09:21:43 +03:00
John Preston
330b4a0b00 API scheme updated to layer 68. 2017-06-29 11:40:08 +03:00
John Preston
8ae159dd66 Add special dc options config request. 2017-06-29 11:40:07 +03:00
John Preston
d47a38dfcf Show change language link in intro. 2017-06-29 11:39:48 +03:00
John Preston
139d4e72b5 Start cloud langpack support.
Change the way langpacks are stored.
Support custom langpacks in the new storage.
2017-06-29 11:39:42 +03:00
John Preston
110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +03:00
Igor Gnatenko
185bdb6704 localstorage: qFlags is working only on enumeration types
Closes: https://github.com/telegramdesktop/tdesktop/issues/3379
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-05-15 14:03:28 +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
8a8e101cd0 Fix crash in file downloader destruction.
Regression was introduced in 835b1801bc.

We need to destroy all FileLoader instances before destroying the
Downloader instance, because they hold pointers to it and call its
methods in destructor if they need to cancel some MTP requests.
2017-04-15 20:39:32 +03:00
John Preston
af28e3b0d7 Alpha 1.0.32: Fix build in Xcode. 2017-04-12 23:28:04 +03:00
John Preston
8eb7f1f1aa Display round video messages using HistoryGif.
Use autodownload and autoplay options from GIFs.
Also improve EditCaptionBox code.
2017-04-12 22:37:26 +03:00
John Preston
8d28d0691f API scheme updated to layer 66.
Support CDN file download.
2017-04-12 22:36:25 +03:00
John Preston
4b7e5750ec Alpha 1.0.31: Fix crash in localstorage. 2017-04-11 20:31:20 +03:00
John Preston
891d200e2d Add TabbedSection which uses the TabbedSelector. 2017-04-10 12:08:56 +03:00
John Preston
0d0307e175 Move ApiWrap to AuthSession.
Also send all ApiWrap requests as an MTP::Sender.
Also create AuthSession only after starting MTProto.
2017-04-07 18:13:19 +03:00
John Preston
835b1801bc Remove Q_OBJECT dependency from ApiWrap.
Also remove it from SingleDelayedCall -> SingleQueuedInvocation.
2017-04-07 18:13:19 +03:00
John Preston
5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00
John Preston
1540f6f528 Use emoji/stickers/gifs slider in EmojiPan.
Also rename EmojiTabs to EmojiSections.
2017-03-31 15:48:01 +03:00
John Preston
a7d0473a1a WebDocument without size is allowed to load.
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.
2017-03-30 12:49:15 +03:00
John Preston
31e3c6a2c6 WebDocument wrap to HistoryPhoto supported.
Only WebDocument with a valid 'size' field value and with a valid
'documentAttributeImageSize' attribute works wrapped as a photo.
2017-03-30 12:49:15 +03:00
John Preston
5666f14829 Allow audio and video files with duration < 1s. 2017-03-27 15:50:40 +03:00
John Preston
d41372dccd Allow MTP_flags(0) and MTP_flags(single_flag). 2017-03-25 18:42:01 +03:00
John Preston
7546245213 Show warning when user edits last seen first time. 2017-03-18 12:49:48 +03:00
John Preston
18151359f3 Fix drag-n-drop images from Firefox.
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.
2017-03-18 12:44:31 +03:00
John Preston
d91a2403b0 Use refs in AuthSession part getters.
Also use only AuthSession data for Contacts/Dialogs loaded state.
2017-03-15 19:24:06 +03:00
John Preston
f2465eba73 Make MTPstring and MTPvector value types.
Also move MTPstring implementation to QByteArray.
2017-03-10 23:27:26 +03:00
John Preston
021454dbd4 Add .jpg to inputFile filename when photo is sent.
Server has some extensions checking for inputMediaUploadedPhoto,
so force the extension to be .jpg anyway. It doesn't matter,
because the filename from inputFile is not used anywhere.

Also own PhotoData::UploadingData through std::unique_ptr.
2017-03-10 18:55:34 +03:00
John Preston
a1b53c660e Show video thumbnail in SendFileBox.
Read media information (image / song / video) in SendFileBox in the
same way it is read in FileLoadTask::process() and reuse it in
FileLoadTask if it was loaded already for the box.
2017-03-10 17:14:10 +03:00
John Preston
9ed8cbe2d1 Send mp4 and quicktime files as videos. 2017-03-10 17:12:51 +03:00
John Preston
81790b2271 Notifications management moved to AuthSession.
Also implemented Global::WorkMode() as an base::Variable.
2017-03-06 18:38:15 +03:00
John Preston
31009b19c6 Removed obsolete storage_file_type fields. 2017-03-04 14:28:21 +03:00
John Preston
83720d8789 Finalizing file renaming. 2017-03-04 13:23:56 +03:00
John Preston
b0dbe9d353 Renamed / moved a bunch of files.
Next commit fixes the build.
2017-03-04 12:56:07 +03:00