Commit graph

74 commits

Author SHA1 Message Date
John Preston
d1e3b9f15d Revert "Check for local URLs more strictly."
This reverts commit c3fda41224.
2024-09-10 14:19:37 +04:00
John Preston
ca47440950 Don't treat .gif as "small image". 2024-09-06 21:07:17 +04:00
John Preston
c3fda41224 Check for local URLs more strictly. 2024-08-21 09:35:46 +02:00
John Preston
8cbb1abff2 Fix wrong non-album image size in send preview.
Regression was introduced in 84288112fc.
2024-04-01 22:44:25 +04:00
23rd
d03d50ef0d Removed cIntRetinaFactor and cRetinaFactor. 2024-03-24 07:10:07 +03:00
Ilya Fedin
00e785a3af Remove unused variables 2023-12-31 22:03:57 +00:00
23rd
baa99be6a5 Removed some unwanted include directives of lang_keys in header files. 2023-11-15 03:30:04 +03:00
John Preston
ff4af1b9bc Fix pasting images from Firefox on Windows.
Fixes #10564.

Together with the image data Firefox sets to the clipboard an URLs list
which has a path to local temp file, created from that image.

Reading images from disk is slower + sometimes the content of the file
is wrong so for this case we prefer to read the image data directly.
2023-03-08 16:10:36 +04:00
John Preston
7d1cc67019 Fix sending modified photos with existing bytes. 2023-01-19 13:05:38 +04:00
John Preston
84288112fc Allow sending photos larger 1280 (experimental).
Improves #6520.
2023-01-02 14:26:41 +04:00
Ilya Fedin
9fba9048af Use the same check for drag'n'drop image type as for file dialog
The code path when choosing an image in file dialog tries to read a QImage with Images::Read and then only checks that mime type starts with image/ in ValidPhotoForAlbum

Core::FileIsImage and QImageReader::canRead checks should provide the same behavior
2022-12-26 14:23:23 +04:00
23rd
4fabb3f2a2 Replaced some qsl with u""_q literal. 2022-11-30 17:17:14 +03:00
23rd
3467fe226f Added ability to send webp as compressed image. 2022-11-22 00:26:49 +00:00
Ilya Fedin
16669402cf Decrease the amount of clipboard data retrievation 2022-09-28 23:59:59 +04:00
Ilya Fedin
e20840b4d4 Use KUrlMimeData for clipboard xdg-desktop-portal integration 2022-08-30 20:25:10 +04:00
John Preston
0df699a054 Allow drag-n-drop-ing files up to 4 GB.
Fixes #24657.
2022-06-22 18:56:01 +04:00
John Preston
0a81246502 Show correct error box when sending file > 4GB. 2022-06-16 13:48:11 +04:00
23rd
3959918fc5 Provided size of big file to premium limit box. 2022-06-07 08:16:39 +03:00
John Preston
6dedf7c63e Update API scheme to layer 143. 2022-05-19 17:27:02 +04:00
John Preston
8b7d2c880e Support rendering Webm videos with alpha. 2022-01-28 19:10:07 +03:00
John Preston
3ff17a8789 Refactor image transformation interfaces. 2022-01-21 15:33:44 +03:00
John Preston
a2db9de4d7 Remove debug code. 2021-09-28 11:30:18 +04:00
John Preston
19ce1edc16 Use base::SafeRound instead of std::round.
Previous assertion violations because of NaN from std::round were
in video streaming, see commits 27d58ba07b, 8f5830d520.

Now the crashes happened in the ConvertScale() call from a background
thread when preparing an image from clipboard for sending to a chat.
2021-09-27 12:13:57 +04:00
John Preston
da1945d0ca Add some more information for an assertion violation. 2021-09-25 22:49:51 +04:00
John Preston
132f127f3f Add some assertions to debug a crash. 2021-09-24 08:44:22 +04:00
23rd
ddd5617043 Fixed processing GIF images as non-album files.
Fixed #16844.
2021-08-23 13:57:31 +03:00
23rd
852e46f0c9 Added filepath removal for modified images in photo editor.
Fixed #16791.
2021-08-12 02:35:53 +03:00
John Preston
c79cd0b692 Use Images::Read instead of App::readImage. 2021-08-11 18:55:08 +03:00
23rd
96b40f43e9 Added ability to drag and drop images in photo editor. 2021-07-06 12:13:06 +03:00
23rd
948302cf02 Added setting to hide photo editor hint. 2021-07-06 12:13:06 +03:00
23rd
4d72d20398 Added ability to send modified images. 2021-07-06 12:13:04 +03:00
John Preston
93a88b54ad Fix sending images from clipboard.
Regression was introduced in ce1b94eb1.
2021-02-17 10:46:36 +04:00
John Preston
ce1b94eb16 Send PDFs only as files.
Fixes #10294.
2021-02-05 13:18:11 +04:00
John Preston
0dc0f588c4 Don't offer sending .pdf-s as photos. 2020-12-24 13:52:38 +04:00
John Preston
a614ccad97 Correctly check media when editing files. 2020-10-30 18:32:19 +03:00
John Preston
012ebdd15e Fix grouping of music files / just files. 2020-10-30 18:32:19 +03:00
John Preston
843fba61ee Allow adding any amount of files in SendFilesBox. 2020-10-30 18:32:19 +03:00
John Preston
0539cc9448 Add a way to recreate SendFilesBox content. 2020-10-30 18:32:19 +03:00
John Preston
202534575b Allow many previews in SendFilesBox. 2020-10-30 18:32:19 +03:00
John Preston
8d2fa313b7 Add setting for grouping files. 2020-10-30 18:32:19 +03:00
John Preston
64ac6b18bf Move SingleMediaPreview to td_ui. 2020-10-30 18:32:18 +03:00
John Preston
b3b11bd9e7 Move PreparedFile/PreparedList to td_ui. 2020-10-30 18:32:18 +03:00
John Preston
39cf51c066 Move SendButton/EmojiButton to td_ui. 2020-10-30 18:32:18 +03:00
John Preston
f0e1d2fd02 'base::optional_variant<' -> 'std::variant<v::null_t,' 2020-09-29 19:03:19 +03:00
23rd
b71062561a Added ability to drag'n'drop videos in SendFilesBox. 2020-08-11 18:13:09 +04:00
23rd
4eaba39a7c Added drag'n'drop area to EditCaptionBox. 2020-07-20 21:44:07 +03:00
John Preston
2df5972f68 Raise file size limit to 2000 MB. 2020-07-08 10:07:01 +04:00
Nicholas Guriev
3c0694280f Fix -Wredundant-move 2020-07-01 00:17:05 +04:00
23rd
d4f2b8dd0e Fixed ability to edit media with sticker.
Regression was introduced in efa4deef6a.
2020-06-05 19:46:34 +04:00
23rd
7b36c91e0d Fixed insertion of 11th image from clipboard in SendFilesBox. 2020-01-28 16:56:03 +03:00