Page MenuHomePhabricator

D21219.diff
No OneTemporary

D21219.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -13,7 +13,7 @@
'core.pkg.js' => '632fb8f5',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => '2d70b7b9',
- 'differential.pkg.js' => 'e6da9e6f',
+ 'differential.pkg.js' => '22ec6f26',
'diffusion.pkg.css' => '42c75c37',
'diffusion.pkg.js' => 'a98c0bf7',
'maniphest.pkg.css' => '35995d6d',
@@ -381,7 +381,7 @@
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
'rsrc/js/application/diff/DiffChangeset.js' => 'a49dc31e',
'rsrc/js/application/diff/DiffChangesetList.js' => '6992b85c',
- 'rsrc/js/application/diff/DiffInline.js' => 'e6b9b4f3',
+ 'rsrc/js/application/diff/DiffInline.js' => 'db754a7b',
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b',
'rsrc/js/application/diff/behavior-preview-link.js' => 'f51e9c17',
@@ -778,7 +778,7 @@
'phabricator-dashboard-css' => '5a205b9d',
'phabricator-diff-changeset' => 'a49dc31e',
'phabricator-diff-changeset-list' => '6992b85c',
- 'phabricator-diff-inline' => 'e6b9b4f3',
+ 'phabricator-diff-inline' => 'db754a7b',
'phabricator-diff-path-view' => '8207abf9',
'phabricator-diff-tree-view' => '5d83623b',
'phabricator-drag-and-drop-file-upload' => '4370900d',
@@ -2113,6 +2113,9 @@
'javelin-uri',
'phabricator-notification',
),
+ 'db754a7b' => array(
+ 'javelin-dom',
+ ),
'e150bd50' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -2132,9 +2135,6 @@
'javelin-dom',
'phabricator-draggable-list',
),
- 'e6b9b4f3' => array(
- 'javelin-dom',
- ),
'e8240b50' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php
--- a/src/infrastructure/diff/PhabricatorInlineCommentController.php
+++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php
@@ -211,6 +211,14 @@
}
$this->saveComment($inline);
+
+ if (strlen($text)) {
+ $this->purgeVersionedDrafts($inline);
+ }
+
+ PhabricatorInlineComment::loadAndAttachVersionedDrafts(
+ $viewer,
+ array($inline));
}
$edit_dialog = $this->buildEditDialog($inline)
diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php
--- a/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php
+++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentEditView.php
@@ -109,7 +109,7 @@
$viewer = $this->getViewer();
$inline = $this->getInlineComment();
- $text = $inline->getContent();
+ $text = $inline->getContentForEdit($viewer);
return id(new PhabricatorRemarkupControl())
->setViewer($viewer)
diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
--- a/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
+++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentView.php
@@ -75,8 +75,6 @@
break;
}
- $original_text = $inline->getContentForEdit($viewer);
-
return array(
'id' => $inline->getID(),
'phid' => $inline->getPHID(),
@@ -84,7 +82,7 @@
'number' => $inline->getLineNumber(),
'length' => $inline->getLineLength(),
'isNewFile' => (bool)$inline->getIsNewFile(),
- 'original' => $original_text,
+ 'original' => $inline->getContent(),
'replyToCommentPHID' => $inline->getReplyToCommentPHID(),
'isDraft' => $inline->isDraft(),
'isFixed' => $is_fixed,
diff --git a/webroot/rsrc/js/application/diff/DiffInline.js b/webroot/rsrc/js/application/diff/DiffInline.js
--- a/webroot/rsrc/js/application/diff/DiffInline.js
+++ b/webroot/rsrc/js/application/diff/DiffInline.js
@@ -96,7 +96,7 @@
// which we're currently editing. This flow is a little clumsy, but
// reasonable until some future change moves away from "send down
// the inline, then immediately click edit".
- this.edit(this._originalText, true);
+ this.edit(null, true);
} else {
this.setInvisible(false);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 7:19 PM (18 h, 48 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6779374
Default Alt Text
D21219.diff (4 KB)

Event Timeline