Page MenuHomePhabricator

Give AphrontTagView a `getViewer()`, deprecate `getUser()`
ClosedPublic

Authored by epriestley on Mar 6 2016, 2:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 6, 11:18 AM
Unknown Object (File)
Thu, Sep 5, 7:39 PM
Unknown Object (File)
Thu, Sep 5, 9:12 AM
Unknown Object (File)
Mon, Sep 2, 9:35 AM
Unknown Object (File)
Sun, Sep 1, 9:51 PM
Unknown Object (File)
Sun, Sep 1, 2:32 PM
Unknown Object (File)
Sun, Sep 1, 2:32 PM
Unknown Object (File)
Sun, Sep 1, 2:32 PM
Subscribers
None

Details

Summary

Two minor changes here:

  • Replace get/setUser() with get/setViewer() for consistency with everything else.
  • getViewer() now throws if no viewer is set. We had a lot of code that either "should" check this but didn't, or did check it in an identical way, duplicating work. In contrast, very little code checks for a viewer but works if one is not present.
Test Plan
  • Grepped for ->user.
  • Attempted to fix all callsites inside *View classes.
  • Browsed around a bunch of applications, particularly Calendar, Differential and Diffusion, which seemed most heavily affected.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley updated this revision to Diff 37157.
epriestley retitled this revision from to Give AphrontTagView a `getViewer()`, deprecate `getUser()`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
  • Also remove redundant setViewer() methods on some Phame views.
chad edited edge metadata.
This revision is now accepted and ready to land.Mar 6 2016, 3:57 PM
This revision was automatically updated to reflect the committed changes.