Make server components of inline comment content handling state-oriented
Summary: Ref T13513. Introduce a formal server-side content state object so the whole state can be saved and restored to the drafts table, read from the request, etc. Test Plan: Created and edited inlines. Reloaded drafts with edits. Submitted normal and editing comments. Grepped for affected symbols. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21275
This commit is contained in:
@@ -218,9 +218,9 @@ abstract class PhabricatorDiffInlineCommentQuery
|
||||
// as it is currently shown to the user, not as it was stored the last
|
||||
// time they clicked "Save".
|
||||
|
||||
$draft_content = $inline->getContentForEdit($viewer);
|
||||
if (strlen($draft_content)) {
|
||||
$inline->setContent($draft_content);
|
||||
$draft_state = $inline->getContentStateForEdit($viewer);
|
||||
if (!$draft_state->isEmptyContentState()) {
|
||||
$inline->setContentState($draft_state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user