Differential D16004 Diff 38526 src/applications/differential/query/DifferentialInlineCommentQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/query/DifferentialInlineCommentQuery.php
| Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | public function adjustInlinesForChangesets( | ||||
| DifferentialRevision $revision) { | DifferentialRevision $revision) { | ||||
| assert_instances_of($inlines, 'DifferentialInlineComment'); | assert_instances_of($inlines, 'DifferentialInlineComment'); | ||||
| assert_instances_of($old, 'DifferentialChangeset'); | assert_instances_of($old, 'DifferentialChangeset'); | ||||
| assert_instances_of($new, 'DifferentialChangeset'); | assert_instances_of($new, 'DifferentialChangeset'); | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $pref = $viewer->loadPreferences()->getPreference( | $no_ghosts = $viewer->compareUserSetting( | ||||
| PhabricatorUserPreferences::PREFERENCE_DIFF_GHOSTS); | PhabricatorOlderInlinesSetting::SETTINGKEY, | ||||
| if ($pref == 'disabled') { | PhabricatorOlderInlinesSetting::VALUE_GHOST_INLINES_DISABLED); | ||||
| if ($no_ghosts) { | |||||
| return $inlines; | return $inlines; | ||||
| } | } | ||||
| $all = array_merge($old, $new); | $all = array_merge($old, $new); | ||||
| $changeset_ids = mpull($inlines, 'getChangesetID'); | $changeset_ids = mpull($inlines, 'getChangesetID'); | ||||
| $changeset_ids = array_unique($changeset_ids); | $changeset_ids = array_unique($changeset_ids); | ||||
| ▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines | |||||