You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6be9999
Browse filesBrowse the repository at this point in the historyBrowse files
* Keep Article drafts after relaunch
Rich text drafts left in the composer after closing the Article editor lived
only in process memory, so quitting Telegram discarded them while regular
drafts survived.
Store them in the item cache under richTextComposerDrafts, keyed by peer and
thread like iOS, restore them when the chat opens, and remove them once the
draft is sent or cleared.
* Rework Article draft persistence after review
Store drafts in an app-specific item cache collection and keep the
entry type in its own file, so the test harnesses that paste
ChatRichTextDraftStore.swift compile again. Keep the stored copy when
the rich editor takes the draft, load it only after the stored text
draft is applied, reload it when the thread changes in place, and drop
reads that return for another thread. Clear the stored copy when a
message is sent, and store inline editor edits half a second after the
last change and when the chat closes.
* Keep Article drafts apart when the topic changes in place
Finish a pending inline save for the old topic, fill the inline editor with
the new topic's draft even when it has focus, write the draft only when it
changed, and keep the business link editor out of the saved draft slot.
* Keep unshown Article drafts and save the editor window on quit
Reload the inline draft only when the topic or chat really changes, so
typing in a topic no longer reseeds and erases it, and clear the editor's
undo history on a switch. A text send no longer removes a saved Article,
and an Article that wasn't shown is not removed when the draft is cleared.
The pending inline save and the Article editor window's content are stored
on quit; the window also autosaves while open, only when its content
changed. A draft with media blocks is edited inline, so Backspace no longer
deletes the whole draft.
* Respect the editor switch and keep editor drafts apart
A saved Article isn't restored while the server turns the rich text
editor off and is kept like one skipped because of input text. Emptying
the editor window removes the saved copy, but nothing is saved before
the window shows its draft. Quick reply, away, greeting and business
link editors no longer share the chat's in-memory slot. The
chat-date-context fixture and the key isolation test are updated.
0 commit comments