Commit Graph

27 Commits

Author SHA1 Message Date
John Preston 3461f3dfc7 Destroy file loaders not delayed. 2018-11-26 11:33:29 +04:00
John Preston 8eb0f3b60a Remove some unneeded Q_OBJECTs. 2018-11-04 15:51:39 +04:00
John Preston 4b5b79e415 Use final Image with different Images::Source-s. 2018-11-04 15:51:37 +04:00
John Preston 9f90d3a7fc Load maps using mtproto instead of google. 2018-10-09 19:27:18 +03:00
John Preston 2e5a0e056c Move to std::optional. 2018-09-21 19:28:46 +03:00
John Preston 55f60866cb Set correct cache tags for different file types. 2018-09-01 18:56:08 +03:00
John Preston 2e7f4c2f21 Use Storage::Cache::Database for file caching. 2018-09-01 18:56:08 +03:00
John Preston 557d363d02 Refresh file references when downloading files. 2018-08-20 17:26:28 +03:00
John Preston 839885910c Pass FileOrigin in all file downloads. 2018-08-20 17:26:28 +03:00
John Preston ee16070abe Update API scheme to layer 86. 2018-08-20 17:26:27 +03:00
John Preston 1392e05ab1 Move all gsl::byte helpers to base/bytes module. 2018-06-03 23:16:34 +03:00
John Preston 4a9db99082 Use application level proxy settings. 2018-05-05 21:55:37 +03:00
John Preston 0f901b3728 Update API and use WebDocument for inline bots. 2018-03-06 16:49:44 +03:00
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston a27ea2d631 Fix possible crash in mtpFileLoader.
If several cdn file parts hashes are received in getCdnFileHashesDone
and some middle one of them cancels the entire loader (for example
because of a file write error) a !_finished assert violation happens.
2017-12-08 17:13:13 +04:00
John Preston b3da99c302 Replace gsl::not_null<T*> with just not_null<T*>. 2017-08-30 19:15:41 +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 2e0513a30f Check CDN file hashes. 2017-07-23 12:34:41 +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 8d28d0691f API scheme updated to layer 66.
Support CDN file download.
2017-04-12 22:36:25 +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 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 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 b0dbe9d353 Renamed / moved a bunch of files.
Next commit fixes the build.
2017-03-04 12:56:07 +03:00