Homec4science

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

Authored by epriestley <git@epriestley.com> on Mar 6 2016, 15:26.

Description

Give AphrontTagView a getViewer(), deprecate getUser()

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.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15412

Details

Committed
epriestley <git@epriestley.com>Mar 6 2016, 18:27
Pushed
aubortJan 31 2017, 17:16
Parents
rPHabb4c03b476d: Remove shouldShowSubscribersProperty() from SubscribableInterface
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHaaab1011e5a4: Give AphrontTagView a `getViewer()`, deprecate `getUser()` (authored by epriestley <git@epriestley.com>).Mar 6 2016, 18:27