Page MenuHomePhorge

Restore draft after editing
Needs ReviewPublic

Authored by nannanko on Oct 13 2025, 12:02 AM.

Details

Reviewers
tusooa
Group Reviewers
O1: the Kazv Project
Maniphest Tasks
T167: Restore user's draft
Summary

m.replace will replace user's draft, this restore it after editing.

This depends on D296

Type: add

Test Plan

Type some draft in a room, then edit a event, check if old draft is restored when exit editing.

Continuously select multiple events for editing, check if initial draft is restored when exit all editing. Additionally, all drafts that are asked to be saved will be saved and popped up in sequence.

When you have a draft and are ready to edit an event, you will be asked to confirm whether to save the draft. When you edit an event but do not send it, you will be asked to confirm whether to discard the draft.

Try switching rooms or reopening kazv, and verify it wroks fine.

Verify unit tests pass.

Diff Detail

Repository
rK kazv
Branch
nannanko/delete-edit-message
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 605
Build 1192: Invoke BuildbotBuildbot build #1614
Build 1191: arc lint + arc unit

Event Timeline

src/tests/quick-tests/tst_SendMessageBoxDrafts.qml
158

I don't know why, the test_saveDraftsOnSwitching() doesn't pass without this line.

nannanko marked an inline comment as not done.Oct 13 2025, 12:11 AM
nannanko edited the summary of this revision. (Show Details)
nannanko edited the summary of this revision. (Show Details)

Currently Kazv cannot remember a room is in the state of editing or replying to an event, which makes restoring a draft difficult to achieve. I think this feture should be divided into several diffs instead of being completed in one diff.

In D245#5654, @nannanko wrote:

Currently Kazv cannot remember a room is in the state of editing or replying to an event, which makes restoring a draft difficult to achieve. I think this feture should be divided into several diffs instead of being completed in one diff.

then you can develop more diffs on top of this. once they are all ready, we can land them together.

Draft can now be restored after switching rooms or reopening kazv.