Commit graph

749 commits

Author SHA1 Message Date
isaac
06d744495c Improve draft sorting 2026-04-30 12:15:57 +04:00
isaac
e7662a3de5 Add typing-draft send delay
Delay outgoing messages while the peer in the same (peerId, threadId)
chat is live-typing an incoming message, gated via a new per-account
Postbox `.allTypingDrafts` view feeding a synchronous Set membership
check inside PendingMessageManager.

Postbox:
- Add `AllTypingDraftsView` tracking `Set<PeerAndThreadId>` of active
  typing drafts; expose via `PostboxViewKey.allTypingDrafts`.
- Disambiguate `PostboxViewKey` hash arms for `.typingDrafts` (constant
  prefix 23) and `.contacts` (16 → 24) to avoid runtime collisions
  with peerId-only arms and `.combinedReadState`. Hash values are
  runtime-only, so this is safe.

PendingMessageManager:
- Add `.waitingForSendGate(groupId:content:)` parking state for single
  messages and albums whose upload finished but are gated on a
  typing-draft-clearing event; update `groupId` accessor and
  `dataForPendingMessageGroup` so partially-parked albums drain on
  gate open.
- Add `.waitingForForwardSendGate` parking state for forwards (no
  associated values) so drain section (1) routes single non-grouped
  messages via `commitSendingSingleMessage` and section (3) routes
  forwards via `sendGroupMessagesContent`, avoiding the double-dispatch
  that occurred when forwards reused `.waitingForSendGate`.
- Subscribe to `.allTypingDrafts`; wire the gate at single-message,
  album, and forward send paths and at drain.
- Cleanup parked forwards on pending-message removal; snapshot
  Dictionary keys before iterating to avoid mutation during iteration.

Specs and plan documents are included under `docs/superpowers/`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 12:15:55 +04:00
isaac
53ed837123 Filter draft events 2026-04-29 21:22:51 +04:00
isaac
524c29cbe3 Various improvements 2026-04-22 00:32:34 +04:00
isaac
3bb22d503c Postbox -> TelegramEngine wave 16a: move EngineMessageHistoryThread to TelegramCore
Promote Postbox's internal MutableMessageHistoryThreadIndexView.Item to a
public top-level type MessageHistoryThreadIndexItem; drop Postbox's empty
EngineMessageHistoryThread namespace class and its nested Item.

MessageHistoryThreadIndexView.items is now [MessageHistoryThreadIndexItem]
directly (no wrap/unwrap step in the init). The two consumer iteration
sites (ChatListNodeLocation.swift, ShareControllerNode.swift) don't need
changes -- they iterate without type annotation and only read fields that
exist on both the old nested Item and the new top-level type.

Collapse TelegramCore's public extension EngineMessageHistoryThread into
a proper class definition:
public final class EngineMessageHistoryThread { class Info { ... } }.

After this, EngineMessageHistoryThread is a pure TelegramCore type --
consumers that only use EngineMessageHistoryThread.Info no longer need
import Postbox for the outer name to resolve.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 21:26:32 +02:00
Isaac
34477605b1 Various improvements 2026-03-31 20:24:24 +08:00
Isaac
c9add89043 More ai button fixes 2026-03-27 22:33:54 +08:00
Isaac
2907ddbe46 Unseen polls 2026-03-27 18:30:01 +08:00
Isaac
bc7858ad2b AI editing 2026-03-20 18:23:45 +01:00
Isaac
72fbe5d7a7 Various improvements 2026-03-13 14:54:44 +01:00
Isaac
e4e5142a96 Various improvements 2026-03-10 17:50:37 +01:00
Isaac
26cc304ca0 Fix bg 2026-02-17 10:19:02 +04:00
Isaac
002df956d2 Bug fixes 2026-02-06 17:14:35 +04:00
Isaac
3a1d85784e Various improvements 2026-01-06 21:20:16 +08:00
Isaac
fedc43fec8 Fix live story stats 2025-10-26 22:24:55 +04:00
Isaac
c880397eca Stories 2025-10-26 22:05:58 +04:00
Isaac
b9b38e5fbf Various improvements 2025-10-11 00:56:21 +08:00
Isaac
1d06c3f058 Bot forums v2 2025-09-05 15:25:50 +02:00
Isaac
ee749050f0 Bot forums 2025-08-19 17:24:33 +02:00
Isaac
826c48a4dc Bot updates 2025-08-15 13:35:06 +02:00
Isaac
92156ffec0 Bot updates 2025-08-15 09:58:39 +02:00
Isaac
b4a0e8809c Temp 2025-08-15 09:18:26 +02:00
Isaac
8843fbe5cb Support typing drafts 2025-08-15 09:18:11 +02:00
Isaac
905a46e6cc Update API 2025-08-11 16:54:32 +02:00
Isaac
18a491fa48 Various improvements 2025-08-08 12:41:03 +02:00
Isaac
865cebe0e7 Levels 2025-07-28 11:55:56 +02:00
Isaac
a5ad030123 Update 2025-07-22 16:08:51 +02:00
Isaac
2ed6f9616b Peer star rating 2025-07-11 14:53:02 +04:00
Isaac
cd3c27fcc2 Various improvements 2025-06-06 15:13:43 +08:00
Isaac
d9a2d06270 Various improvements 2025-05-30 23:06:26 +08:00
Isaac
eb3f95ea63 Monoforums 2025-05-29 02:05:13 +08:00
Isaac
3cad999c75 Fix monoforum user unread counters 2025-05-27 18:41:24 +08:00
Isaac
e2bc739c7f Monoforums 2025-05-27 13:13:53 +08:00
Isaac
3910ecdca2 Monoforums 2025-05-23 23:03:52 +08:00
Isaac
9633013275 Monoforums 2025-05-23 15:56:01 +08:00
Ilya Laktyushin
81e11d6d36 Various improvements 2025-05-20 22:30:48 +02:00
Mikhail Filimonov
3ff51a5ef8 Merge branch 'monoforums' of gitlab.com:peter-iakovlev/telegram-ios into monoforums 2025-05-16 14:07:13 +01:00
Isaac
09c49d47d9 [WIP] Monoforums 2025-05-16 21:03:00 +08:00
Mikhail Filimonov
58986c0a4f Merge branch 'monoforums' of gitlab.com:peter-iakovlev/telegram-ios into monoforums 2025-05-15 18:03:13 +01:00
Isaac
1a56afcb48 [WIP] Monoforums 2025-05-16 01:02:25 +08:00
Mikhail Filimonov
65eb853b56 Merge branch 'monoforums' of gitlab.com:peter-iakovlev/telegram-ios into monoforums 2025-05-15 09:11:37 +01:00
Mikhail Filimonov
fa52568dde peerId 2025-05-15 09:11:30 +01:00
Isaac
f90402102b [WIP] Monoforums 2025-05-14 00:50:46 +08:00
Isaac
9e18743b1b Support Xcode 16.3 2025-05-13 11:40:24 +08:00
Isaac
4bbea1f0d0 Conference improvements 2025-04-18 17:56:24 +04:00
Isaac
bb015f2bfa Various improvements 2025-03-13 00:34:59 +01:00
Isaac
4f29f9b1de Various improvements 2025-03-04 15:57:41 +01:00
Isaac
da48b145e9 Various improvements 2025-02-21 16:17:15 +01:00
Ilya Laktyushin
3032fe0738 Various fixes 2025-01-25 02:33:41 +04:00
Isaac
b20cc376c4 Video Player V2 2024-12-27 20:07:37 +08:00