Commit Graph

55 Commits

Author SHA1 Message Date
John Preston c5df4db621 Fix possible race conditions in msgid(). 2019-07-15 16:00:30 +02:00
John Preston 567bf60644 Use getters in MTP classes. 2019-07-05 16:23:07 +02:00
John Preston 0a63eac4f6 Generate good thumbnail for animated stickers. 2019-07-04 10:20:36 +02:00
John Preston 7034df49e9 Fix sending of .tgs stickers. 2019-07-03 13:03:01 +02:00
John Preston 4917ca7b32 Remove all legacy global namespace langs. 2019-06-21 11:06:52 +02:00
John Preston 8b804d1995 Allow sending animated stickers. 2019-05-28 17:45:30 +02:00
John Preston 08bddc5579 Move messages data to AuthSession. 2019-05-01 16:11:42 +04:00
23rd 37af963717 Fixed work with _msgIdToEdit in FileLoadTask.
- Added check is allowed media editing in paintEvent.
 - Fixes #5885.
2019-04-06 11:24:11 +04:00
23rd 5d8888bb8b Refactored code.
- Refactored passing message id to edit media.
 - Removed get/setEditMedia from mainwidget.
 - Combined onEditMedia and onSendFileConfirm in single method.
 - Added argument in FileLoadTask to pass message id to edit media.
 - Renamed flags in apiwrap.
 - Added check for allowing edit media when use clipboard.
 - Removed unused fileIsValidForAlbum.
 - Removed LOGs.
 - Replaced _isNotAlbum with _isAlbum.
 - Removed _viaRemoteContent.
 - Removed _newMediaPath.
 - Added empty() to MessageGroupId.
2019-04-02 18:14:12 +04:00
23rd d605b18ec0 Fixed checking for song without file path. 2019-04-02 18:14:12 +04:00
23rd 1ed83cf193 Fixed subscribeToUploader. 2019-04-02 18:14:12 +04:00
23rd be58e23775 Init edit media. 2019-04-02 18:14:11 +04:00
John Preston aa8f62da9d Support new ('modern') API file locations. 2019-03-29 14:24:07 +04:00
John Preston fe618bd652 Use crl::time/now instead of TimeMs/getms. 2019-02-19 11:06:33 +04:00
John Preston 032694ad9e Move files to media/audio and media/clip. 2019-02-13 15:41:33 +03:00
John Preston 95565c39ed Upload wallpapers to the cloud. 2019-02-08 19:20:08 +03:00
John Preston a1baa23a52 Use both thumbnails in photos and documents.
Fixes #5602.
2019-01-28 13:10:45 +03:00
John Preston 314e30272b Replace SingleTimer with base::Timer. 2019-01-18 16:41:08 +04:00
John Preston 8643972f8c Send thumbs only for big files. 2019-01-18 16:41:07 +04:00
John Preston d2d6b319b6 Update API scheme to layer 93. Broken. 2019-01-17 12:21:28 +04:00
John Preston 7b5e5c2587 Move caption to the next album item on cancel.
After #4869 albums are sent with captions in the first media.
In case we cancel the first media leaving the rest of the album
the caption will be lost unless we move it to the new "first" media.
2018-12-26 11:24:12 +04:00
John Preston ef38572d5a Detect and send supports_streaming bit for videos. 2018-11-07 18:10:00 +04:00
John Preston 8000ff2cd7 Generate high quality thumbnail on sending video. 2018-11-04 15:51:38 +04:00
John Preston 4b5b79e415 Use final Image with different Images::Source-s. 2018-11-04 15:51:37 +04:00
John Preston 8c1cc51c2e Move peer photo update from Messenger to ApiWrap. 2018-09-19 19:22:13 +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 0e9793b845 Move MimeType from utils to core/mime_type.
Also move to Core namespace.
2018-06-14 01:08:47 +03:00
John Preston 5e7642b42a Support markdown and replaces in media captions. 2018-05-24 16:03:21 +03:00
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston 5f8143e6a4 Fix build in Xcode. 2017-12-26 19:20:08 +03:00
John Preston a8ac18e4fd Save send way (album, photos, files) to settings. 2017-12-26 19:20:07 +03:00
John Preston ff65daa9fe Remove special case in SendFilesBox for an image. 2017-12-26 19:20:06 +03:00
John Preston 3b3a705a67 First working code for sending albums. 2017-12-26 19:20:06 +03:00
John Preston 37b018257e Replace some std::shared_ptr with std::unique_ptr. 2017-12-18 14:38:14 +04:00
John Preston 14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +04:00
John Preston b2f29b674d Send audio files with correct attributes.
Regression was introduced in 8b69e6ab99.

Fixes #4163.
2017-12-12 18:56:38 +04:00
John Preston 8b69e6ab99 Rename some methods in DocumentData.
Also fix voice message mark as read when autoplaying after previous.
Also show play icon and don't show playlist for audio files that do
not have shared music files attributes but have audio file mime type.
2017-12-10 14:28:04 +04:00
John Preston 0c4bda71fd Remove some unused / rare phrases. 2017-11-16 07:59:05 +04:00
John Preston ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +04:00
John Preston f162462111 Move info between Layer and Narrow wrap. 2017-11-16 07:59:03 +04: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 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 110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +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 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +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 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