266 Commits

Author SHA1 Message Date
23rd
6e8d16bc54 Replaced qRound with base::SafeRound. 2026-09-14 18:41:41 +03:00
23rd
3535fafe1a Replaced qMin, qMax and qAbs with std::min, std::max and std::abs. 2026-09-14 18:03:15 +03:00
23rd
0bd5cf3d81 Fixed video cover media not released with heavy parts. 2026-09-13 10:05:37 +03:00
John Preston
af45fe5e0b Stop overview and inline-bot players rewriting dimensions
Task: 2026/09/01/stop-overview-and-inline-bot-dimension-rewrites
2026-09-03 22:26:25 +04:00
John Preston
eda64abe22 Fixed huge allocation cropping a panorama thumbnail.
Expanding to the box before cropping avoids deep copying a 12000x9000
photo, but it blows up the other way on an extreme aspect ratio: a
2560x26 panorama expands to about 35000x360, where cropping first cost
almost nothing. Both orders scale by the same factor, so take whichever
intermediate is smaller.
2026-08-26 23:25:38 +04:00
John Preston
1d76c8f979 Fixed huge allocation cropping shared media photos.
CropMediaFrame() cut the frame out at the source resolution before
scaling, deep copying the whole cut region - a few hundred megabytes for
a 12000x9000 photo in a square cell. Expanding to the box applies the
same scale factor, so the visible pixels are unchanged.
2026-08-26 23:25:37 +04:00
John Preston
70c994ee05 Fixed huge allocation blurring shared media photos. 2026-08-26 23:25:36 +04:00
John Preston
9a26118ae1 Clean up merged music attach code
Fold the three AllowsMediaDownloadControls copies into
HistoryItem::allowsMediaDownloadControls, share one retry-or-fail
handler in SendMusicSelectionBatch, reuse MakeMusicSelectionItems
instead of the NormalizeSelections near-copy and extract the
duplicated bot resolution block into applyResolvedBot.

Remove the dead accumulate-from-top machinery from both music
providers and the list widget, the subscriber-less slice snapshot
stream, the never-started search section request timer and the
unused Result::isAudioResult.

Consolidate the sixteen MusicAttachBox make_state allocations into
one State struct, fix the include order, use base::take for the
request waiters, replace the removeFromAlbum if-with-initializer
with a plain null-checked session and type kSearchRequestDelay as
crl::time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 08:45:58 +04:00
John Preston
4e8d9a560e Don't show corner download in selection mode. 2026-08-14 16:23:44 +04:00
John Preston
ec689724ae Initial ability to send audio in attaches. 2026-08-14 16:23:44 +04:00
23rd
90c89dcde9 Added missing const to local references in some files. 2026-08-12 13:36:02 +03:00
23rd
90ca232bff Added external task entries to downloads manager. 2026-08-05 15:46:56 +03:00
John Preston
15e13137af Guard GIF layout against empty decoded frames
Task: 2026/08/03/guard-gif-layout-against-empty-frames
2026-08-04 13:08:46 +04:00
23rd
edec595dc5 Split per-consumer blocks out of big style files. 2026-07-27 14:04:37 +03:00
23rd
56653b926d Moved video tile scaling off main thread in overview layout. 2026-07-15 13:11:47 +04:00
23rd
6296bcb55e Moved photo tile scaling off main thread in overview layout. 2026-07-15 13:11:47 +04:00
23rd
484502793b Added elements animating check to overview layout items. 2026-07-15 13:11:47 +04:00
23rd
416361dcab Added caching of duration width in overview video layout. 2026-07-15 13:11:47 +04:00
23rd
cfc99e4678 Added support of zoom in shared media for photos. 2026-06-26 15:22:28 +03:00
23rd
ff3eb41541 Added file preview to shared media drag. 2026-06-26 15:22:28 +03:00
John Preston
e38fc74d1c Mark IV links in shared links section. 2026-06-08 23:24:46 +04:00
23rd
90e7db03be Separated spoiler reveal from media opening in shared media sections. 2026-06-01 13:59:32 +03:00
23rd
763fce3326 Added support to document view display of sanitized SVG preview. 2026-05-18 10:36:52 +03:00
John Preston
9eda44ca31 Improve checks for video frame sizes. 2026-05-01 00:15:20 +07:00
Ilya Fedin
f6ac2c5aa9 Revert "Don't stream videos when external player is used"
This reverts commit b0ce88395f.
2026-03-10 12:40:17 +04:00
John Preston
08a979e638 Use more simple tr::... text helpers. 2025-12-15 21:40:54 +04:00
John Preston
29d77b649b Nice selection of gifts for a collection. 2025-08-22 13:05:26 +04:00
John Preston
953487bb65 Display hidden state in story albums. 2025-07-31 22:20:18 +04:00
John Preston
4b85c9e2df Add spoilers to shared GIFs. 2025-07-23 11:40:37 +04:00
23rd
9ad1d1c25d Fixed some unused-but-set-variable warnings. 2025-05-01 11:13:00 +04:00
John Preston
c9fb97cd7c Simplify marked text context logic. 2025-03-07 19:03:40 +04:00
John Preston
e05bb75b8a Allow sending videos with covers. 2025-02-12 17:24:24 +04:00
23rd
9a44ca2769 Fixed display of message without text in section of shared links. 2024-09-11 16:31:46 +03:00
23rd
26ba7e57ce Fixed color of radial animation in audio files from shared media. 2024-05-28 20:30:40 +04:00
23rd
b406e2b99b Fixed sender name for voices in overview layout when sender is hidden. 2024-05-14 17:19:39 +03:00
23rd
c1c49e8ddc Added captions to voice messages in overview layout. 2024-05-14 17:19:39 +03:00
John Preston
645ad5e1bd Update pinned icon in stories list. 2024-04-23 19:13:47 +04:00
John Preston
9036e9e8e3 Show pinned icon in stories. 2024-04-23 19:13:47 +04:00
John Preston
6a28cd1a35 Reimplement file open confirmations. 2024-04-15 12:07:27 +04:00
23rd
d03d50ef0d Removed cIntRetinaFactor and cRetinaFactor. 2024-03-24 07:10:07 +03:00
Ilya Fedin
9d582040e6 Fix detaching temporaries 2023-12-31 22:03:57 +00:00
23rd
acb1a7ccf2 Spread some style entries from basic style. 2023-11-15 04:19:51 +03:00
John Preston
0e79bd3d12 Show nice padded code blocks. 2023-10-13 10:08:29 +04:00
23rd
7ffb341597 Removed some unwanted include directives of styles in header files. 2023-09-08 11:40:18 +03:00
John Preston
fcd1062d78 Use message date instead of file date in voices. 2023-07-28 12:19:53 +04:00
John Preston
48687d443f Use message date instead of file date. 2023-07-28 11:48:16 +04:00
John Preston
6607848abc Fix build with GCC. 2023-07-20 07:20:46 +04:00
John Preston
e98770d418 Improve saved / archive stories design. 2023-07-20 07:20:12 +04:00
John Preston
aba84a6010 Update API scheme on layer 160: Duration. 2023-07-20 07:20:10 +04:00
John Preston
2a4c39b9d7 Implement some power saving options. 2023-03-01 09:12:02 +04:00