2980 Commits

Author SHA1 Message Date
John Preston
73f055c44e Use brace-init instead of make_pair. 2026-09-17 12:38:30 +04:00
23rd
657ac9957f Replaced qSwap, qMakePair and qSin with std equivalents. 2026-09-14 18:03:31 +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
07767ed43a Added reuse of loaded calendar page for neighbour months.
Related commit: 0134b928dc.
2026-09-01 17:46:47 +03:00
23rd
ff8f8c75d4 Added release of calendar thumbnails outside of nearby months. 2026-09-01 17:46:47 +03:00
23rd
473ab1ed15 Moved rounding of calendar thumbnails from paint to dynamic image. 2026-09-01 17:46:47 +03:00
23rd
0ad5380b78 [ttl-media] Fixed ttl media saving to download folder. 2026-09-01 17:45:03 +03:00
23rd
a6a91bc9a1 [ttl-media] Fixed previews showing content of ttl media. 2026-09-01 17:45:03 +03:00
John Preston
762ef1525f Fix online timer overflow after a local clock jump. 2026-08-28 17:32:23 +04:00
23rd
049b4ad5c7 Added getter of automatic clear time to emoji statuses. 2026-08-27 09:52:20 +04:00
John Preston
7e4e39d93c Don't hide a download another entry still owns.
detach() reported the item removed even when another downloaded entry
still held it, so the downloads list dropped a row that was still backed
by a file until the view was rebuilt.
2026-08-26 23:25:38 +04:00
John Preston
51ac1a6b30 Fixed abort scheduling TTL with a wrong system clock.
The interval was computed from two int32 timestamps, so a wrapped or
stale unixtime::now() - which is what the OS correcting a badly wrong
clock produces - overflowed it negative, and base::Timer aborts on that.
2026-08-26 23:25:37 +04:00
John Preston
f1f2933f97 Fixed deleting all downloads of one message.
deleteFiles() is addressed by item, but removed only the first matching
download and then fired loadedRemoved anyway, so the rest kept their
files while the row was already hidden. changed() likewise re-checked
only the first entry.
2026-08-26 23:25:37 +04:00
John Preston
6e3fb880d1 Fixed use-after-free in the recent chats switcher. 2026-08-26 23:25:37 +04:00
John Preston
4446222aeb Fixed use-after-free with several downloads per message. 2026-08-26 23:25:37 +04:00
John Preston
c2169c6546 Fixed crash saving a photo with no loaded image. 2026-08-26 23:25:37 +04:00
John Preston
4cf1edd519 Fixed use-after-free in the group call bar content. 2026-08-26 23:25:37 +04:00
John Preston
c5c3f4a7ab Fix chat closing and removing from list on restricted self receive.
I hope this fixes #31172, fixes #31174.
2026-08-25 18:59:50 +04:00
23rd
7094102a90 Deferred filter list lookup until chat membership is known. 2026-08-24 07:51:05 +03:00
23rd
14454053fc Replaced option lookup with cached flag in dialogs sort key.
Related commits: 5d52a283d4, 8509f9e410.
2026-08-24 07:51:04 +03:00
23rd
31e67384d6 Fixed non-finite video duration crashing attributes parsing. 2026-08-22 15:14:24 +04:00
John Preston
e9399834de Present community joins service messages.
Task: 2026/08/14/fix-refreshed-layer-230-scheme-and-community-joins
2026-08-22 15:13:36 +04:00
John Preston
0b8de41369 Workaround strange fields in ephemeral messages. 2026-08-22 00:34:01 +04:00
23rd
6eb6a89d20 Added accent color to call previews in dialogs widget. 2026-08-21 14:38:14 +03:00
23rd
acd806e634 Added direction and video icons to call previews in dialogs widget. 2026-08-21 14:38:14 +03:00
23rd
ca97b3f9b5 Returned reactions list for anonymous non-owner admins.
Just to be in line with Telegram Android, Telegram iOS, Telegram Web A
and Telegram Web K, none of which check anonymity before showing
reactions.

Related commit: 3f24627f54.
2026-08-21 14:38:14 +03:00
23rd
db7faca277 Got rid of cast-to-void result discarding. 2026-08-21 14:38:14 +03:00
23rd
6298b1b436 Extracted reactive check for peer allowing forwarding. 2026-08-19 11:31:11 +03:00
John Preston
38aec1e3d4 Fix build on Linux. 2026-08-19 00:33:28 +04:00
John Preston
3667c0e7ae Attribute poll vote notifications to the voted message
Task: 2026/08/18/attribute-poll-vote-notifications-to-voted-message
2026-08-18 18:15:11 +04:00
John Preston
96d63afc3f Initial WEB proxy implementation. 2026-08-18 16:05:50 +04:00
John Preston
aa1fafc55d [chat] Inject sponsored messages in modern chat view. 2026-08-18 11:17:57 +04:00
John Preston
5c4627d4d6 [chat] Append sponsored messages in modern chat view. 2026-08-18 11:17:57 +04:00
John Preston
9caa7f7469 [chat] Resolve reviewed follow-ups: restriction bar, access errors, perf.
- Send-restriction UI now has a single owner: ComposeControls' write
  restriction bar, matching Replies/Sublist modes. BottomControls'
  duplicate (overlapping, wrongly sized) bar is removed and the
  monoforum-admin "choose a message to reply" state is ported into the
  section's write restriction producer.
- History load failures with CHANNEL_PRIVATE / CHANNEL_PUBLIC_GROUP_NA /
  USER_BANNED_IN_CHANNEL close the chat with the not-accessible toast
  (and handle expired invite peeks), like the legacy view, via a new
  Data::Session::historyAccessLost signal fired from
  ApiWrap::requestHistory.
- SparseIdsList::Slice::merge inserts single ids instead of re-sorting
  the whole accumulated set, so the every-message full-history index
  updates in O(log n) instead of O(n log n).
- Unread counting queries the index in place through the new
  SparseIdsList::countAfter instead of copying up to 10000 ids on every
  read-marking tick.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 11:17:57 +04:00
John Preston
aaf833e3ec [chat] Fix migrated chat view bugs and pre-existing-mode regressions.
Parity fixes for the new Mode::History path, plus regression fixes for
the pre-existing Replies/Sublist/topic flows and the shared list/compose
widgets, found via a feature-by-feature comparison against the legacy
HistoryWidget/HistoryInner.

Crashes:
- Bot start deep links (ShowAndStartBotMsgId/ShowAndMaybeStartBotMsgId)
  no longer feed a special id into the sparse-ids viewer; /start is sent
  and inlineReturnTo is preserved.
- Touch long-press over empty space with an active selection no longer
  dereferences a null view in the translate-selected menu branch.
- AboutView element use-after-free when the card is replaced/destroyed.
- HistoryMessagesViewer no longer asserts on unresolved slice ids
  (chat preview hardened).

History-mode parity:
- Typing/recording send actions, incoming/outgoing cloud drafts, manual
  mark-as-unread clearing on open, channel-unavailable close.
- Force-reply dismissal after sending; bot keyboards no longer
  resurrected by slice rescans; single-use re-show persists; keyboard
  height parity; keyboard hidden while in-chat search is open.
- Unread mentions/reactions/poll-votes corner buttons; reply-return
  stack; jump-to-date calendar; AboutView hit-testing + intro sticker
  send; empty-group card.
- Quick Replies and moderate-mode hotkeys autocomplete; interactive
  emoji; view-once (TTL) voice button; per-post Statistics and
  paid-reaction context items; topic-creating bots; inline-bot slowmode
  checks; edit-time countdown.
- Navigation stack clear/dedup, embedded-search recursion guard,
  choose-to-report on the legacy path, active-chat re-click jump,
  show-at-end positioning, unread-count undercounting, uncached-jump
  blanking.

Regressions in pre-existing flows:
- Comments: unread jump on re-open, unread bar, and stray group-call/
  requests/contact-status bars no longer leak into threads.
- Topics: no extra reply cancel on normal sends.
- Replies: bot command via section override threads into the comment.
- In-place migration re-subscribes the pinned tracker.

Performance:
- Killed a self-perpetuating 14s draft-write loop.
- Restored updateBotKeyboard's unchanged-state early-out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 11:17:57 +04:00
John Preston
39f3ae7c6b [chat] Fix some bugs in modern chat view. 2026-08-18 11:17:57 +04:00
John Preston
36014dfb1f [chat] Migrate history reading and local messages. 2026-08-18 11:17:56 +04:00
John Preston
a61d0f772f Don't make unique gifts too narrow. 2026-08-18 09:31:38 +04:00
23rd
52e03030f2 Split statistics data to lists and td_ui parts. 2026-08-18 07:53:56 +03:00
23rd
c3fc47bd66 [poll-view] Fixed answer media dropped for pending webpage. 2026-08-18 07:53:49 +03:00
John Preston
4f3b7fba37 Narrow unique gift cards to their own content
Task: 2026/08/17/narrow-unique-gift-cards-to-their-content
2026-08-17 23:00:37 +04:00
John Preston
0a2606f328 Balance unique gift messages, preview resale cards
Task: 2026/08/17/refine-unique-gift-messages-and-resale-preview
2026-08-17 23:00:36 +04:00
23rd
03623f080b Added cover frame timestamp to sent videos. 2026-08-17 08:33:45 +03:00
23rd
cdbe1c7a1e Added preparing phase with progress for video downscaling. 2026-08-17 08:33:44 +03:00
John Preston
0522c07db8 Show sender messages on unique gift detail covers
Task: 2026/08/15/show-messages-on-unique-gift-covers
2026-08-16 08:44:32 +04:00
John Preston
673c6a0367 Render sender messages in unique gift chat cards
Task: 2026/08/15/render-messages-on-unique-gift-chat-cards
2026-08-16 01:39:04 +04:00
John Preston
9567d044b3 Filter-out non-forwardable music files. 2026-08-14 16:23:44 +04:00
John Preston
04c0564724 Support correct shared music loading. 2026-08-14 16:23:44 +04:00
John Preston
e2bc4cef5b Clear directly-deleted local photos from cache. 2026-08-14 13:27:51 +04:00
John Preston
f669a52726 Fix mixed ephemeral message deletion and forwarding
Task: 2026/08/13/fix-mixed-ephemeral-message-actions
2026-08-14 08:54:55 +04:00